Query problems

G

Guest

I would like to know how I can set up a default value when I have a Parameter
entery field. IE Between [Enter Beginning Product Code] And [Enter Ending
Product] I would like the default to be a wild card or another value.
Can I set all these values and selections on one form taht when populated
the query will run to produce a report?
 
J

John Spencer

Well, you could get a default value, but it will not display. You just use
the NZ function.

You can't use wildcards with the Between ... and ... opereator.

Between NZ([Enter Beginning Product Code],"aaaaa") And NZ([Enter Ending
Product] ,"zzzzz")

You might try somethng like the following
Between [Enter Beginning Product Code] And [Enter Ending Product] OR
LIKE IIF([Enter Beginning Product Code] is Null, "*",Null) OR
LIKE IIF([Enter Ending Product] is Null, "*",Null)

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

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