parameter query, form-based

Lifeseeker

Registered User.
Local time
Today, 06:18
Joined
Mar 18, 2011
Messages
273
Hi,

I'm pulling my hair out on this one. (handling null values in a parameter query)
I've attached a copy of my test database.

The problem is...as you can see in the query... if I leave the field blank, nothing gets returned. However, it works if you actually specify the criteria.

I must be missing something here....can anyone help me on this?

thank you
 

Attachments

The following Criteria will do the trick;
Code:
Like [URL="http://www.techonthenet.com/access/functions/advanced/nz.php"]Nz[/URL]([forms]![search]![text0],"*")
However when I look at your query records in SQL view I found the following line of extraneous code in your query;
Code:
PARAMETERS [Forms]![search]![Text0] Text ( 255 );
remove that from your query and it should work fine.

Also consider implementing a naming protocol for your DB Objects and controls along the lines of TBL_TableName, FRM_FormName, QRY_QueryName, this will make identifying the object you are referring to in your code a lot clearer. also avoid spaces and other special character like the plague.
 

Users who are viewing this thread

Back
Top Bottom