Sql Question

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
 
D

Dirk Goldgar

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)"
 
J

JamesJ

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top