Parameter query

T

trawets

Hi
I have read through various posts and answers and for some reason I am
missing something.

I am trying to create a query that will let me choose a value from a
drop down list before running the query.

First I create a look up column in my main table and then another
table with the look up values, straight away these two are linked OK
so far
Table 1 = main table and Table 2 = Focus Area

Next I create a form with a combo box which is linked to the values
the syntax I use in data row source

SELECT [Focus Area].[Focus Area] FROM [Focus Area];

all still seems OK when I run for it lets me choose from a drop down
list
So No I create a query with my fields that I require from table 1
(main table)
in the parameter field of the Focus area table field I enter the
following

[Forms]![Focus]![Get focus]

which is generated using the expression builder
well all should be OK I think
so I run the query and all I see is a parameter query box which
requests an input value and not my list
Can anyone see what I'm doing wrong here.

I know there are a million answers to the pick list paramet query
questions and I am sorry if its been asked before
 
J

Jeff Boyce

Queries (in Access) don't provide a "drop-down' list for a parameter. If
you want the user to select an item from a (drop-down) list, create a form
and add a combo box with your list. Then add a command button that runs the
query, and modify the query to use the form's combo box for its parameter
value.

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 
T

trawets

Queries (in Access) don't provide a "drop-down' list for a parameter. If
you want the user to select an item from a (drop-down) list, create a form
and add a combo box with your list. Then add a command button that runs the
query, and modify the query to use the form's combo box for its parameter
value.

--
Regards

Jeff Boycewww.InformationFutures.net

Microsoft Office/Access MVPhttp://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentorhttp://microsoftitacademy.com/




Hi
I have read through various posts and answers and for some reason I am
missing something.
I am trying to create a query that will let me choose a value from a
drop down list before running the query.
First I create a look up column in my main table and then another
table with the look up values, straight away these two are linked OK
so far
Table 1 = main table and Table 2 = Focus Area
Next I create a form with a combo box which is linked to the values
the syntax I use in data row source
SELECT [Focus Area].[Focus Area] FROM [Focus Area];
all still seems OK when I run for it lets me choose from a drop down
list
So No I create a query with my fields that I require from table 1
(main table)
in the parameter field of the Focus area table field I enter the
following
[Forms]![Focus]![Get focus]
which is generated using the expression builder
well all should be OK I think
so I run the query and all I see is a parameter query box which
requests an input value and not my list
Can anyone see what I'm doing wrong here.
I know there are a million answers to the pick list paramet query
questions and I am sorry if its been asked before- Hide quoted text -

- Show quoted text -

Thank you, thank you
what I had been trying to do was run the form with the query instead
of making the form run the query
thanks for your explanation.
next bit is to display these query results in a report
is that easy to do
I am on a learning curve here, but enjoying it though.
 
J

Jeff Boyce

Get your query working first. When it's show the data you want in your
report, create a report based on the query, instead of on a table.

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

trawets said:
Queries (in Access) don't provide a "drop-down' list for a parameter. If
you want the user to select an item from a (drop-down) list, create a form
and add a combo box with your list. Then add a command button that runs the
query, and modify the query to use the form's combo box for its parameter
value.

--
Regards

Jeff Boycewww.InformationFutures.net

Microsoft Office/Access MVPhttp://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentorhttp://microsoftitacademy.com/




Hi
I have read through various posts and answers and for some reason I am
missing something.
I am trying to create a query that will let me choose a value from a
drop down list before running the query.
First I create a look up column in my main table and then another
table with the look up values, straight away these two are linked OK
so far
Table 1 = main table and Table 2 = Focus Area
Next I create a form with a combo box which is linked to the values
the syntax I use in data row source
SELECT [Focus Area].[Focus Area] FROM [Focus Area];
all still seems OK when I run for it lets me choose from a drop down
list
So No I create a query with my fields that I require from table 1
(main table)
in the parameter field of the Focus area table field I enter the
following
[Forms]![Focus]![Get focus]
which is generated using the expression builder
well all should be OK I think
so I run the query and all I see is a parameter query box which
requests an input value and not my list
Can anyone see what I'm doing wrong here.
I know there are a million answers to the pick list paramet query
questions and I am sorry if its been asked before- Hide quoted text -

- Show quoted text -

Thank you, thank you
what I had been trying to do was run the form with the query instead
of making the form run the query
thanks for your explanation.
next bit is to display these query results in a report
is that easy to do
I am on a learning curve here, but enjoying it though.
 

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