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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using IsNull on Query

Status
Not open for further replies.

ibij

Technical User
Sep 10, 2007
2
US
Hi:

I'm fairly new to VBA and have what I hope is a simple question. I am trying to determine if a field ("Notes") in a parameter query ("qryNote")is empty.

DoCmd.OpenQuery "qryNote", acViewNormal, acReadOnly
If IsNull("Note") = True Then...

The query seems to always return the field value as always null. Help?
 
That is not going to work, you need a Recordset or DLookUp. How many records are returned by this query?
 
I think you have 2 operations confused.

You would use the isnull in the query.

Select *
FROM test
WHERE (((test.field1) Is Null));


Then would need to programmatically determine values or conditions by opening the recordset.

Hope this helps.

MIke

 
Thanks, Guys, for your replies (and sorry about the late response.) :)

Mike, your response pointed me in the right directions and I found a work-around. Thanks again!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top