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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top