Make data entry required in one field if another field is entered.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two fields in a form, Supplier Code and Date issued. If a user enters
data in the Supplier Code field, they must enter a date in Date issued. How
do I do this? With a macro? I know this must be simple and I'm probably
over complicating the problem.
 
If the suppliers textbox name is "Supplier"
and you date textbox is "DateDone"
Try

'put this in the "Suppliers" afterupdate event
Me.DateDone.SetFocus

'put this in the "DateDone" onexit event
If IsNull(Me.DateDone) or Me.DateDone = "" Then
MsgBox "Please Enter a Date"
Me.DateDone.Setfocus
End If

That should force them to enter a date.
 
Back
Top