Using Is Not Null in openrecordset

G

Guest

Set rs = CurrentDb.OpenRecordset("Select * From [AgentData] where
[MiscText])" Is Not Null, dbOpenDynaset)

MiscText is a text filed

I'm getting a Type Mismatch error
 
M

M.L. Sco Scofield

Is Not Null is part of the SQL statement so it needs to be inside the
quotes. Try:

Set rs = CurrentDb.OpenRecordset("Select * From [AgentData] where
[MiscText]) Is Not Null", dbOpenDynaset)

Good luck.

Sco

M.L. "Sco" Scofield, Microsoft Access MVP, MCSD, MCP, MSS, A+
Denver Area Access Users Group Vice President www.DAAUG.org
MS Colorado Events Administrator www.MSColoradoEvents.com
Useful Metric Conversion #18 of 19: 8 nickels = 2 paradigms (My personal
favorite)
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 
A

Alex Dybenko

Try:
Set rs = CurrentDb.OpenRecordset("Select * From [AgentData] where [MiscText]
Not IsNull", dbOpenDynaset)
 
D

Douglas J. Steele

Set rs = CurrentDb.OpenRecordset("Select * From [AgentData] where [MiscText]
Is Not Null", dbOpenDynaset)


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Alex Dybenko said:
Try:
Set rs = CurrentDb.OpenRecordset("Select * From [AgentData] where
[MiscText] Not IsNull", dbOpenDynaset)

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


jsccorps said:
Set rs = CurrentDb.OpenRecordset("Select * From [AgentData] where
[MiscText])" Is Not Null, dbOpenDynaset)

MiscText is a text filed

I'm getting a Type Mismatch error
 
M

M.L. Sco Scofield

Like I said! :)

Sco

M.L. "Sco" Scofield, Microsoft Access MVP, MCSD, MCP, MSS, A+
Denver Area Access Users Group Vice President www.DAAUG.org
MS Colorado Events Administrator www.MSColoradoEvents.com
Useful Metric Conversion #18 of 19: 8 nickels = 2 paradigms (My personal
favorite)
Miscellaneous Access and VB "stuff" at www.ScoBiz.com


Douglas J. Steele said:
Set rs = CurrentDb.OpenRecordset("Select * From [AgentData] where [MiscText]
Is Not Null", dbOpenDynaset)


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Alex Dybenko said:
Try:
Set rs = CurrentDb.OpenRecordset("Select * From [AgentData] where
[MiscText] Not IsNull", dbOpenDynaset)

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


jsccorps said:
Set rs = CurrentDb.OpenRecordset("Select * From [AgentData] where
[MiscText])" Is Not Null, dbOpenDynaset)

MiscText is a text filed

I'm getting a Type Mismatch error
 

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