check for empty/NULL value in controls

jguscs

Registered User.
Local time
Today, 10:55
Joined
Jun 23, 2003
Messages
148
I've got a recordsource that feeds the value of the control AddDate in a report.
The recordsource is blank/empty/uninitialized/NULL.
I want the result of the code below to spit out a pop-up message box that says EMPTY! but it doesn't work.
The code is in the Detail_Format section of the report.
Any ideas?

If IsEmpty(Me.AddDate) Then
MsgBox "EMPTY!"
End If
 
This may work...
Code:
If Me.AddDate = "" Then 
MsgBox "EMPTY!" 
End If

IMO
 
it didn't:
Error 2427
You entered an expression that has no value.
and points to the line:
If Me.AddDate = "" Then
 
Code:
Private Sub YourReport_Activate()
If IsNull(Me.AddDate) Then
MsgBox "EMPTY!" 
End If
End Sub

IMO
 
OK.
For anyone who searches for info in this post and wants the answer,...

Use the IsDate function.
 

Users who are viewing this thread

Back
Top Bottom