A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

enable/disable, show/hide checkbox help



 
 
Thread Tools Display Modes
  #1  
Old December 2nd, 2009, 04:52 PM posted to microsoft.public.access.forms
EddWood[_2_]
external usenet poster
 
Posts: 25
Default enable/disable, show/hide checkbox help

I have a Invoice form with a line items subform. On the subform I have a
checkbox for users to select which items of the order are to be shipped.

If I have the form open in 'Edit'mode users can select the check box to
indicate which items they wish to ship. However, as it is in edit mode, they
can also inadvertently select a checkbox for a row that does not have a
record and as such the application throws an error message as it has no
related record.

I therefore need a method that allows me to open the form in edit mode, but
does not have any blank records for the checkbox to be selected in error.

On the main form I have a field txtShippmentID that by default has no value,
and I require the user to create a shipment code in the first instance, so
my thought was to have something in the checkbox like:

Private Sub Form_Current()
If Me.txtShipmentID = "" Then
Me.Form!frmInvoiceLineItems.Check85.Visible = False
Else
Me.Form!frmInvoiceLineItems.Check85.Visible = True
End If
End Sub

But I think I am reference the subform incorrectly as it throws an error
saying it cannot find the field frmInvoiceLineItems?

But even if that was to work it would still be possible for a user to select
the checkbox for a blank row, so need a way I can only show the checkbox for
rows with a record.

Any suggestion most welcome




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:36 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.