I have a Form and Subform. How can I make a rule that won't allow a user to enter data on the subform until the Mainform is filled out?
I have a Form and Subform. How can I make a rule that won't allow a user to enter data on the subform until the Mainform is filled out?
There is no setting for this. Would require VBA code to control.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Sorry I knew that it would require vba. Below is what I have. Right now whether or not the Main form (Dispatchmain) is filled out or not the message is triggered. The Invoice_CustomerID is what I want to be required to be filled out before the user fills out the subform. If possible I would prefer to not allow the user to select the subform at all.
Private Sub DropOffLocation_Progression_Click()
If (IsNull([Forms]![DispatchMain]![Invoice_CustomerID].Tag) Or [Forms]!DispatchMain]![Invoice_CustomerID].Tag = "") Then
MsgBox "A selection from Bill To: above must be made be fore entering route information", vbOKOnly, "Bill to: Selection"
Forms!BillToLBL.SetFocus
End If
End Sub
Thanks
You could set the subform container control to not visible or not enabled. Then in some event reverse this setting when criteria is met.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thank you I got it to work