Hello Friends,
I have a form "Orders" there is one field "Order Date".
So I want that when I make new order and if I forget entering date first then it should give me message " Please enter date first "
so what is code for this?
Thanks
Hello Friends,
I have a form "Orders" there is one field "Order Date".
So I want that when I make new order and if I forget entering date first then it should give me message " Please enter date first "
so what is code for this?
Thanks
One way:
http://www.baldyweb.com/BeforeUpdate.htm
You can also make the field required in the table.
Thank you brother.
It working fine for making new order.
But I want that when I start new order so without entering date no field should be update.
I tried this code on Orderdate before event but its not working.
If Len(Me.ORDERDATE & vbNullString) = 0 Then
MsgBox "Enter Date First"
Cancel = True
Me.ORDERDATE.SetFocus
End If
I would use the form's before update event. You can't count on the control's update event firing because it won't if the user skips over it or tabs through it.
Ok brother.
Thanks for your help.
Happy to help.