List for a Query

C

Chris

I posted this a couple of days ago but I can't seem to find the post so I am
asking it again. I have a Select Query that I would like it, when prompting
me to specify what information it should show, to give a drop down list for
me to pick specific information from. That is, I want it to have a list from
me to pick from when it asks the question.

The SQL that I have been using is:

SELECT SecurityGroupNames.SecurtyGroupName, CompleteList.UserName
FROM SecurityGroupNames INNER JOIN CompleteList ON
SecurityGroupNames.SecurityGroupNamesID = CompleteList.SecurtyGroupName
WHERE (((SecurityGroupNames.SecurtyGroupName)=[Please enter Security Group]));

I don't know if this needs to be changed in any way. I want the list to
come from the SecurityGroupName table that it shown above. Not sure what I
need to do differently here. Please help.
 
R

Roger Carlson

Generally, you create a small form with a drop-down box on it. Have your
query reference the drop-down box value as the parameter. Then launch the
report from a button on the form.

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "ChooseReportFromList.mdb" which illustrates how to do this.
You can find it here:
http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=383. This
sample uses a listbox, but a combo-box (drop-down) will work the same.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
C

Chris

There is good information here but not exactially what I am looking for.
There is no way for the query that I am running to have a dropdowm menu when
prompt for information? What I am gathering from your example is that I run
form reports but I am not sure how to make a form. I am lucky I got the SQL
right with the query up till now lol.

Roger Carlson said:
Generally, you create a small form with a drop-down box on it. Have your
query reference the drop-down box value as the parameter. Then launch the
report from a button on the form.

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "ChooseReportFromList.mdb" which illustrates how to do this.
You can find it here:
http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=383. This
sample uses a listbox, but a combo-box (drop-down) will work the same.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


Chris said:
I posted this a couple of days ago but I can't seem to find the post so I
am
asking it again. I have a Select Query that I would like it, when
prompting
me to specify what information it should show, to give a drop down list
for
me to pick specific information from. That is, I want it to have a list
from
me to pick from when it asks the question.

The SQL that I have been using is:

SELECT SecurityGroupNames.SecurtyGroupName, CompleteList.UserName
FROM SecurityGroupNames INNER JOIN CompleteList ON
SecurityGroupNames.SecurityGroupNamesID = CompleteList.SecurtyGroupName
WHERE (((SecurityGroupNames.SecurtyGroupName)=[Please enter Security
Group]));

I don't know if this needs to be changed in any way. I want the list to
come from the SecurityGroupName table that it shown above. Not sure what
I
need to do differently here. Please help.
 
D

Douglas J. Steele

There's no way to have a query prompt using a combo box. The only way to get
a combo box would be to use a form.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Chris said:
There is good information here but not exactially what I am looking for.
There is no way for the query that I am running to have a dropdowm menu
when
prompt for information? What I am gathering from your example is that I
run
form reports but I am not sure how to make a form. I am lucky I got the
SQL
right with the query up till now lol.

Roger Carlson said:
Generally, you create a small form with a drop-down box on it. Have your
query reference the drop-down box value as the parameter. Then launch
the
report from a button on the form.

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "ChooseReportFromList.mdb" which illustrates how to do
this.
You can find it here:
http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=383. This
sample uses a listbox, but a combo-box (drop-down) will work the same.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


Chris said:
I posted this a couple of days ago but I can't seem to find the post so
I
am
asking it again. I have a Select Query that I would like it, when
prompting
me to specify what information it should show, to give a drop down list
for
me to pick specific information from. That is, I want it to have a
list
from
me to pick from when it asks the question.

The SQL that I have been using is:

SELECT SecurityGroupNames.SecurtyGroupName, CompleteList.UserName
FROM SecurityGroupNames INNER JOIN CompleteList ON
SecurityGroupNames.SecurityGroupNamesID = CompleteList.SecurtyGroupName
WHERE (((SecurityGroupNames.SecurtyGroupName)=[Please enter Security
Group]));

I don't know if this needs to be changed in any way. I want the list
to
come from the SecurityGroupName table that it shown above. Not sure
what
I
need to do differently here. Please help.
 

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