Parameter with a List box

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

Guest

My mdb works off of two main companies (A and B).
I am trying to build a parameter query that instead of just asking which
company it should run for; I want a list box so the user can select the
company.
This is a straight query, not in a form or report.

Any help would be appreciated.

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

Well, you could use a parameter query w/ a prompt (a pop-up dialog box).
E.g.:

PARAMETERS [Which Company?] Text(1);
SELECT *
FROM table_name
WHERE Company = [Which Company?]

The pop-up prompt doesn't have the ability to display a list box
(actually, if you're selecting only one out of many you should use a
ComboBox - its more intuitive. ListBoxes seem to imply that you can
choose many out of many).

If you wanted to have a ComboBox (or ListBox) prompt you'd have to
create a form that has that control. Once the user has selected the
company they want the query to run on, the form would run the query.
The query would need to reference the form to pull the required
parameters.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

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

iQA/AwUBQRkxgYechKqOuFEgEQIJnACfdPfRtZCW1m9sKkBfXcqX0Z2tpL0AoNmc
9rU7FAXThEGyLsuZFZ2KSKvg
=lKl+
-----END PGP SIGNATURE-----
 
Back
Top