form to subform

  • Thread starter Thread starter newbie via AccessMonster.com
  • Start date Start date
N

newbie via AccessMonster.com

Hello

Does anyone know how to make a textbox a required entry in a SUBFORM when a
textbox on the main form is entered?
 
Use the BeforeUpdate event procedure of the subform.

This kind of thing:

Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me.Text0) And Not IsNull(Me.Parent!Text1) Then
Cancel = True
MsgBox "You must fill in Text0 if Text1 on the main form has a
value."
End If
End Sub
 
Back
Top