Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation on form 1

Status
Not open for further replies.

nycbigapple

Technical User
Apr 4, 2006
33
0
0
US
Hi, I am trying to validate a field on a subform, where do I put the validation on the form to prevent the user form leaving the record.

this is what I put on the subform but it goes to next record
Thanks
Code:
Private Sub Form_AfterUpdate()
If IsNull(txtCompletedDate) = True Then
    Me.txtCompletedDate.SetFocus
    Cancel = True
End If

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top