retrieve several records

  • Thread starter Thread starter Ashley
  • Start date Start date
A

Ashley

I would like to retrieve several records with different
Serial Numbers in my table at one time. I like to do this
by typing these serial numbers on a form.
How can I set this up in my query criteria?

Thanks
Ashley
 
There are several options. You can base your form on a parameter query.
You can also create a pop-up form or dialogue box that prompts the user
for a serial number. Search the OLH for "What is a parameter query and
when would you use one?" for more information.

hth,

LeAnne
 
Dialogue box can only retrieve one serial number at a
time. I want to do several serial numbers.
Ashley
 
Would these be completely different serial numbers, or related groups
(e.g. 1 thru 999, or all serial numbers beginning with "0812")? If the
latter, you can use the LIKE keyword in your parameter criteria:

SELECT *
FROM YourTable
WHERE [SerialNumber] Like "*" & [Enter Number Here] & "*"));

If the user were to input, say, "666" when prompted, this example will
return records for all serial numbers that have "666" anywhere in the
number.

SELECT *
FROM YourTable
WHERE [SerialNumber] Like [Enter Number Here] & "*"));

If the user were to input "666" when prompted, this example will return
records for all serial numbers that START with "666".

You could also set an upper (or lower) limit for a range of serial
numbers like so:

SELECT *
FROM YourTable
WHERE [SerialNumber] < [Enter Number Here];

Off the top of my head, I'm afraid I can't think of a way to prompt the
user for multiple, unrelated serial numbers ("Show me all records for
serial numbers 123456, 999888, 242526, and 000001") without code.

Hoping this may be helpful,

LeAnne
 
They are completely different numbers.
Ashley
-----Original Message-----
Would these be completely different serial numbers, or related groups
(e.g. 1 thru 999, or all serial numbers beginning with "0812")? If the
latter, you can use the LIKE keyword in your parameter criteria:

SELECT *
FROM YourTable
WHERE [SerialNumber] Like "*" & [Enter Number Here] & "*"));

If the user were to input, say, "666" when prompted, this example will
return records for all serial numbers that have "666" anywhere in the
number.

SELECT *
FROM YourTable
WHERE [SerialNumber] Like [Enter Number Here] & "*"));

If the user were to input "666" when prompted, this example will return
records for all serial numbers that START with "666".

You could also set an upper (or lower) limit for a range of serial
numbers like so:

SELECT *
FROM YourTable
WHERE [SerialNumber] < [Enter Number Here];

Off the top of my head, I'm afraid I can't think of a way to prompt the
user for multiple, unrelated serial numbers ("Show me all records for
serial numbers 123456, 999888, 242526, and 000001") without code.

Hoping this may be helpful,

LeAnne


Dialogue box can only retrieve one serial number at a
time. I want to do several serial numbers.
Ashley
.
 
In that case, go to http://support.microsoft.com and search the KB for
article #100131 "How to Create a Parameter In() Statement."

The talented Roger Carlson has posted a solution that may also work for
you. Go to

http://www.rogersaccesslibrary.com/

Click on "Access 97 and 2000 Library," scroll down to the P's, and take
a look at "ParaQuerySelect."

Good luck,

LeAnne
They are completely different numbers.
Ashley
-----Original Message-----
Would these be completely different serial numbers, or related groups
(e.g. 1 thru 999, or all serial numbers beginning with "0812")? If the
latter, you can use the LIKE keyword in your parameter criteria:

SELECT *
FROM YourTable
WHERE [SerialNumber] Like "*" & [Enter Number Here] & "*"));

If the user were to input, say, "666" when prompted, this example will
return records for all serial numbers that have "666" anywhere in the
number.

SELECT *
FROM YourTable
WHERE [SerialNumber] Like [Enter Number Here] & "*"));

If the user were to input "666" when prompted, this example will return
records for all serial numbers that START with "666".

You could also set an upper (or lower) limit for a range of serial
numbers like so:

SELECT *
FROM YourTable
WHERE [SerialNumber] < [Enter Number Here];

Off the top of my head, I'm afraid I can't think of a way to prompt the
user for multiple, unrelated serial numbers ("Show me all records for
serial numbers 123456, 999888, 242526, and 000001") without code.

Hoping this may be helpful,

LeAnne


Dialogue box can only retrieve one serial number at a
time. I want to do several serial numbers.
Ashley
-----Original Message-----
There are several options. You can base your form on a
parameter query.
You can also create a pop-up form or dialogue box that
prompts the user
for a serial number. Search the OLH for "What is a
parameter query and
when would you use one?" for more information.

hth,

LeAnne

Ashley wrote:

I would like to retrieve several records with different
Serial Numbers in my table at one time. I like to do
this
by typing these serial numbers on a form.
How can I set this up in my query criteria?

Thanks
Ashley
.
.
 
Back
Top