UNdo if date is null

theinviter

Registered User.
Local time
Today, 11:54
Joined
Aug 14, 2014
Messages
273
Dear Guys;
i need a help.

i have a form to filter to fill , if user did not select date first and he add any value them , i want msgbox to show text message and cancel the data entered;

i tried this but not working.

Private Sub TOTAL_PHYSICAL_COUNT_AfterUpdate()

If IsNull(Date_From) Then
MsgBox " Please Add Date Range"
Me.TOTAL_PHYSICAL_COUNT.Undo

Else

TRT= Text140
End If
End Sub
 
Are these UNBOUND controls just for input of filter criteria?

If these are BOUND controls for input of data to record, use form BeforeUpdate event for data validation of record.
 
Are these UNBOUND controls just for input of filter criteria?

If these are BOUND controls for input of data to record, use form BeforeUpdate event for data validation of record.
yes its bound to record in data. but i tried before update , the same problem , if i type any number and date field in null it will be added to record.
 

Users who are viewing this thread

Back
Top Bottom