Specifying value of zero (1 Viewer)

nick5196

Registered User.
Local time
Today, 13:39
Joined
Feb 17, 2011
Messages
43
Hi,
very simple. I have this code
If Me.comments.Value = "" Then
MsgBox "No Comments to show", vbExclamation, "Chichester College"
End
Else
Me.Refresh
DoCmd.OpenReport "rptIndividualStudentComment", acViewReport, "", "", acNormal
How do i specify if the value = nothing/zero/empty if you see what i mean.
Thanks
Nick
 

boblarson

Smeghead
Local time
Today, 13:39
Joined
Jan 12, 2001
Messages
32,059
A good way to handle nulls as well as empty strings is:
Code:
If Len(Me.Comments & vbNullString) = 0 Then
  MsgBox "No Comments to show", vbExclamation, "Chichester College"
 
...etc.
 

nick5196

Registered User.
Local time
Today, 13:39
Joined
Feb 17, 2011
Messages
43
thanks a lot
 

Users who are viewing this thread

Top Bottom