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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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 | |
|
|