Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If IsNull 1

Status
Not open for further replies.

lars7

Technical User
Aug 16, 2005
817
GB
Hi,
Could anyone tell me why this isn't working but if I change it to "If Not IsNull" and select the list boxes it does.

If IsNull(Me!List7 & Me!List8) Then
Beep
MsgBox "Please select a manager and date for the report.", vbExclamation, "Required selection"
Exit Sub
End If

thanks.
 
It's working fine with date fields but not with text.
 
Hi,
I worked it out myself thanks. Can I give myself a star? :)

If (Me!List10) = "" Then
Beep
MsgBox "Please select a location for the report.", vbExclamation, "Required selection"
Exit Sub
End If
 
Lars,
Often you will see on this site the following

if trim(cntrlName & " ") = "" then ...

The versatility of the above is that it catches
a null
a hard space
and an empty string
 
Thanks Majp,
I will use your's from now on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top