status validation help
On Thu, 3 Jun 2010 16:22:09 -0700, Gabe
wrote:
Hello, I need some help coding this one...
I have 3 fields in a form Amount, Date, and Status. If the user inputs an
Amount then they must enter a "Date" in order for the database to accept a
Complete "Status".
The Status field has several drop down choices, Open, Pending, Complete, etc.
Any help would be greatly appriciated!!
Thanks,
~Gabe
Use the Form's BeforeUpdate event to check that the data is valid; e.g.
Private Sub Form_BeforeUpdate(Cancel as Integer)
If IsNull(Me![Date]) AND Me![Status] = "Complete" Then
Cancel = True
MsgBox "Please enter a date before selecting COMPLETE"
End If
End Sub
--
John W. Vinson [MVP]
|