A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

drop-down list for query parameter



 
 
Thread Tools Display Modes
  #1  
Old September 10th, 2004, 11:59 AM
external usenet poster
 
Posts: n/a
Default drop-down list for query parameter

Hi. I have a simple query parameter in which I would like
to have a drop-down list (instead of blank field). For
example, before I see query for students I would like to
be prompted with a list of teachers.

I'm sure this is a very simple issue, I just can't seem to
find answer in online help or elsewhere. Thanks in
advance for any info and/or ideas.
  #2  
Old September 10th, 2004, 12:42 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default

You can only do this with a form.

Create a form with a combo box that has its RowSource set to the table of
teachers.

In the Criteria row under the relevant column in your query, enter something
like:
[Forms].[Form1].[cbo1]
replacing "Form1" with the name of your form, and "cbo1" with the name of
your combo.

Make sure the form is open, and the desired record selected before running
the query.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

wrote in message
...
Hi. I have a simple query parameter in which I would like
to have a drop-down list (instead of blank field). For
example, before I see query for students I would like to
be prompted with a list of teachers.

I'm sure this is a very simple issue, I just can't seem to
find answer in online help or elsewhere. Thanks in
advance for any info and/or ideas.



  #3  
Old September 10th, 2004, 04:57 PM
Tom Braun
external usenet poster
 
Posts: n/a
Default

I have a similar scenario and I have successfully used the combo box value as
a parameter in a Access query. I now need to take two fields returned from
the query and place them in text fields in my form. How would I go about
manipulating these controls in my form?

Thanks,
Tom

"Allen Browne" wrote:

You can only do this with a form.

Create a form with a combo box that has its RowSource set to the table of
teachers.

In the Criteria row under the relevant column in your query, enter something
like:
[Forms].[Form1].[cbo1]
replacing "Form1" with the name of your form, and "cbo1" with the name of
your combo.

Make sure the form is open, and the desired record selected before running
the query.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

wrote in message
...
Hi. I have a simple query parameter in which I would like
to have a drop-down list (instead of blank field). For
example, before I see query for students I would like to
be prompted with a list of teachers.

I'm sure this is a very simple issue, I just can't seem to
find answer in online help or elsewhere. Thanks in
advance for any info and/or ideas.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting a drop down list Using Forms 1 August 24th, 2004 11:17 PM
Excel 2000: Data Validation List - no drop down arrow; no frozen cells Matt. Worksheet Functions 3 August 20th, 2004 06:13 PM
Drop Down Menus Dude Worksheet Functions 1 June 24th, 2004 12:25 AM
synchronizing form and list box Deb Smith Using Forms 8 June 21st, 2004 08:15 PM
How to create drop down list having options to the right of cell Vipul Vashisht Worksheet Functions 5 November 15th, 2003 02:12 PM


All times are GMT +1. The time now is 01:04 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.