Paramater Query Help

  • Thread starter Thread starter Andrew
  • Start date Start date
A

Andrew

Sorry to double post but my last post was hijacked by people needing help as
well. Thanks in advance

I have a table the has a section block and lot number (s-b-l). I want to
query based on this number and have the results added to a new report for
printing. I want to be able to query as many numbers as they wish in one
sitting, maybe seperate them by a comma for searching? not sure how its
done. I understand i need to add something in the criteria of the query but
im not sure how it all works. Can anyone help?
 
I got the criteria working for one record - I made a form where I can type
in the number to search and a button that runs a report (based from a query
that points to the text box on my form) How can i get it so that I use more
than one number seperated by a comma that the query will seperate its
results and display more than one number and not read it as a literal
string?
 
The only way I've ever done what you're trying to do is
to parse out the values between your separator (e.g. a
comma), and then build a criteria string dynamically.

This gets kind of complicated, because parsing the values
between separators requires using arrays, as well as
storing the values themselves for building your criteria.

A simpler solution might be to use a (local) table to let
users enter in their choices, then step thru a recordset
based on that table, and use BuildCriteria function to
create your criteria string.

After running the report, you could simply delete all the
records in the table, or, leave them there for the users
to use again, or remove them as they choose.
 
Back
Top