Others have pointed out IsNull, from the way you describe the error your
trying to detect I think you may be better off with
If Len(Trim(LName & "")) < 1 Then
MsgBox "Last name can not be left blank"
End If
This will detect when
a) No entry is made (LName Is Null)
b) An empty string is entered (data has been entered and then deleted
gives rise to this)
c) Someone just taps the space bar
--
Terry Kreft
MVP Microsoft Access
"Brenda" <br****@mycollegeinfo.com> wrote in message
news:41**********************@news.newsgroups.ws.. .
I am trying to write an "If" statement that looks like this.
If LName = Null Then
MsgBox "Last name can not be left blank"
End If
I can not get it to recognize Null. What is wrong with the statement,
or should be used instead of null.
Thank you,
Brenda
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!