Sql Question

  • Thread starter Thread starter JamesJ
  • Start date Start date
J

JamesJ

Trying to return records if the record has data in Email field with the
on the OnClick of a command button:

Dim strSQL As String

strSQL = "SELECT * FROM tblContacts WHERE (Email<>IsNull)"
Me.RecordSource = strSQL

It's not working and I'm getting a headache.

Any help will be appreciated,
James
 
JamesJ said:
Trying to return records if the record has data in Email field with the
on the OnClick of a command button:

Dim strSQL As String
strSQL = "SELECT * FROM tblContacts WHERE (Email<>IsNull)"
Me.RecordSource = strSQL

It's not working and I'm getting a headache.


Try this:

strSQL = "SELECT * FROM tblContacts WHERE (Email Is Not Null)"
 
Thanks much,

James

Douglas J. Steele said:
strSQL = "SELECT * FROM tblContacts WHERE Is Not Null"


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


[QUOTE="JamesJ"]
Trying to return records if the record has data in Email field with the
on the OnClick of a command button:

Dim strSQL As String
strSQL = "SELECT * FROM tblContacts WHERE (Email<>IsNull)"
Me.RecordSource = strSQL

It's not working and I'm getting a headache.

Any help will be appreciated,
James[/QUOTE]
[/QUOTE]
 
Back
Top