Query from a list of choices

C

Cesar

Hi all,
My data base is about Equipment and their failures, date, spare part used,
etc. I need to create a query (actually a report) where I can retrieve the
information related to one equipment in particular whithout having the query
asking me to type the Equipment? I want to be able to select from a drop
down list or so, I have my available equipment in another table to choose
from. Similar funcionality that is used when in a Form a field is filled from
a Combobox or a List.

Thanks, I'll appreciate the help
 
M

MGFoster

Cesar said:
Hi all,
My data base is about Equipment and their failures, date, spare part used,
etc. I need to create a query (actually a report) where I can retrieve the
information related to one equipment in particular whithout having the query
asking me to type the Equipment? I want to be able to select from a drop
down list or so, I have my available equipment in another table to choose
from. Similar funcionality that is used when in a Form a field is filled from
a Combobox or a List.

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

You can reference the ComboBox in the query like this:

PARAMETERS Form!FormName!ComboBoxName Long;
SELECT equipment_id, equipment_name, <other columns>
FROM table_name
WHERE equipment_id = Form!FormName!ComboBoxName

Substitute your data type for the ComboBox value: Text, Integer, etc.
Substitute your column and table names where necessary.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

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

iQA/AwUBSaMCWYechKqOuFEgEQLQnQCfcfymqw/zDUBiQfO7XuYRoUrFD4IAnRlN
UaH98XXY9VtNi5Fz6kt3Kw4o
=d+R5
-----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

Top