Having a query prompt for multiple data inputs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a storage table that contains over 12000 records.
In that table there are 2 fields [Job #] & [Version] that would be
referenced by this new query.
The user would like to be able to search for groups of records by entering
in their individual Job #'s (their associated versions would by default be
pulled into the results), and then have the results of all those records
entered by the user displayed.
What I would like to do is have a query or SQL statement;, whichever works
the best, continually prompt the user for a Job # until that user has entered
all the ones they need to, and then have the query or SQL statement display
the results.
How can that be done? I know how to do a single prompt in a Select Query,
but how do you have it loop through the same prompt until the user is done?

Thanks1
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is a kludge solution: use the InStr() function in the query's
WHERE clause. E.g.:

PARAMETERS [Enter a comma delimited list of Job Numbers]
SELECT *
FROM table_name
WHERE InStr("," & [Enter a comma delimited list of Job Numbers] & "," ,
"," & [Job #] & ",") > 0

The reason this is a kludge is 'cuz the InStr() function causes the
query to scan the whole table instead of using an index (if one was
associated w/ the Job # column).
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQ+usCoechKqOuFEgEQKZpACgkVn5iAN/ixfIikLWqEmOvBPZrXoAn1CU
H71mVrKcjsfyJuroZSbO/JgF
=twdd
-----END PGP SIGNATURE-----
 

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

Back
Top