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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Required Field Help

Status
Not open for further replies.

Zonie32

Technical User
Jan 13, 2004
242
US
Hi All,

I have this bit of code in a Forms Before Update Event:

Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me.BatchDate) Then
MsgBox "BatchDate Must Not Be Left Blank!"
Cancel = True
BatchDate.SetFocus
End If
End Sub

Now I want to add a piece of code to this where it only displays this message if another field called 'Completed Date' is entered. So if CompletedDate is entered, then display message, if CompletedDate is blank, then DO NOT display message and let the user move on.
 
If IsNull(Me.BatchDate) [!]And IsDate(Me![Completed Date])[/!] Then

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top