Drop down menu criteria input

  • Thread starter mark_jm via AccessMonster.com
  • Start date
M

mark_jm via AccessMonster.com

I have a query, and when I run it I want the user to input criteria for one
field by selecting an option from a drop down menu. I am currently typing in
the [criteria] so an input box appears when running the query. The field is a
field which is a lookup field in the table in question.

How do I get the same lookup to appear when I run a query on that table.

So Field Companyname in table purchaseorders looks up on field supplier in
table suppliers.

How do I get a list of supplier from suppliers to appear as a criteria input
box at time of running the query?
 
A

Allen Browne

The query cannot pop up a combo box, so you will need to design a form with
a combo.

The Criteria of the query can refer to the combo like this:
[Forms].[Form1].[Combo2]
 
M

mark_jm via AccessMonster.com

I will give it a go thanks for the help

Allen said:
The query cannot pop up a combo box, so you will need to design a form with
a combo.

The Criteria of the query can refer to the combo like this:
[Forms].[Form1].[Combo2]
I have a query, and when I run it I want the user to input criteria for one
field by selecting an option from a drop down menu. I am currently typing
[quoted text clipped - 11 lines]
input
box at time of running the query?
 
M

mark_jm via AccessMonster.com

I have tried your suggestion, but not quite getting there.

My criteria is:
[Forms].[customer_combo_form].[CompanyNamecombo]

mark_jm wrote:Ive just type this exact expressio inti the criteria on the
query.
When I run the query I just get an "enter parameter value" window with the
expresion as the string, just awaiting me to input a number.

Any advice?

Thanks

Mark
I have a query, and when I run it I want the user to input criteria for one
field by selecting an option from a drop down menu. I am currently typing in
the [criteria] so an input box appears when running the query. The field is a
field which is a lookup field in the table in question.

How do I get the same lookup to appear when I run a query on that table.

So Field Companyname in table purchaseorders looks up on field supplier in
table suppliers.

How do I get a list of supplier from suppliers to appear as a criteria input
box at time of running the query?
 
M

mark_jm via AccessMonster.com

have tried your suggestion, but not quite getting there.

My criteria is:
[Forms].[customer_combo_form].[CompanyNamecombo]

mark_jm wrote:Ive just type this exact expressio inti the criteria on the
query.
When I run the query I just get an "enter parameter value" window with the
expresion as the string, just awaiting me to input a number.

Any advice?

Thanks

Mark



Allen said:
The query cannot pop up a combo box, so you will need to design a form with
a combo.

The Criteria of the query can refer to the combo like this:
[Forms].[Form1].[Combo2]
I have a query, and when I run it I want the user to input criteria for one
field by selecting an option from a drop down menu. I am currently typing
[quoted text clipped - 11 lines]
input
box at time of running the query?
 
A

Allen Browne

The request for a parameter means Access can't find the combo on the form.

It should work if:
- Your form is named customer_combo_form.
- The form has a combo named CompanyNamecombo.
- The form is open (not in design view) before you run the query.
- You selected something in the combo.
- The combo's Bound Column is the right data type to match the field you are
applying this to.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

mark_jm via AccessMonster.com said:
have tried your suggestion, but not quite getting there.

My criteria is:
[Forms].[customer_combo_form].[CompanyNamecombo]

mark_jm wrote:Ive just type this exact expressio inti the criteria on the
query.
When I run the query I just get an "enter parameter value" window with the
expresion as the string, just awaiting me to input a number.

Allen said:
The query cannot pop up a combo box, so you will need to design a form
with
a combo.

The Criteria of the query can refer to the combo like this:
[Forms].[Form1].[Combo2]
I have a query, and when I run it I want the user to input criteria for
one
field by selecting an option from a drop down menu. I am currently
typing
[quoted text clipped - 11 lines]
input
box at time of running the query?
 
M

mark_jm via AccessMonster.com

Yes in those circumstances it does work. If I open the form, select an entry
in the combo, then open the query the query returns the correct results.

What I am trying to do is make the combo appear be it on a form or in a msg
box of some kind when the query is run, which will be at the time a report
which has the query as its data source is run.

Possible?

Mark

Allen said:
The request for a parameter means Access can't find the combo on the form.

It should work if:
- Your form is named customer_combo_form.
- The form has a combo named CompanyNamecombo.
- The form is open (not in design view) before you run the query.
- You selected something in the combo.
- The combo's Bound Column is the right data type to match the field you are
applying this to.
have tried your suggestion, but not quite getting there.
[quoted text clipped - 20 lines]
 
A

Allen Browne

No.

A query is a data retrieval mechanism. It is not the interface.

Think the other way around: Start with the form, and then generate the
output in the format you need.

(Ultimately, that's how you design an Access program.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

mark_jm via AccessMonster.com said:
Yes in those circumstances it does work. If I open the form, select an
entry
in the combo, then open the query the query returns the correct results.

What I am trying to do is make the combo appear be it on a form or in a
msg
box of some kind when the query is run, which will be at the time a report
which has the query as its data source is run.

Possible?

Mark

Allen said:
The request for a parameter means Access can't find the combo on the form.

It should work if:
- Your form is named customer_combo_form.
- The form has a combo named CompanyNamecombo.
- The form is open (not in design view) before you run the query.
- You selected something in the combo.
- The combo's Bound Column is the right data type to match the field you
are
applying this to.
have tried your suggestion, but not quite getting there.
[quoted text clipped - 20 lines]
input
box at time of running the query?
 
M

mark_jm via AccessMonster.com

mmmmmmm. I get you, but that will probably give me other issues... I'll be
back tomorrow.

Thanks once again

Allen said:
No.

A query is a data retrieval mechanism. It is not the interface.

Think the other way around: Start with the form, and then generate the
output in the format you need.

(Ultimately, that's how you design an Access program.)
Yes in those circumstances it does work. If I open the form, select an
entry
[quoted text clipped - 25 lines]
 
M

mark_jm via AccessMonster.com

got it s working now

Thanks for your help

Allen said:
No.

A query is a data retrieval mechanism. It is not the interface.

Think the other way around: Start with the form, and then generate the
output in the format you need.

(Ultimately, that's how you design an Access program.)
Yes in those circumstances it does work. If I open the form, select an
entry
[quoted text clipped - 25 lines]
 

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