Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter Query With Combo Box Problem

Status
Not open for further replies.

jamieharrop

Vendor
Oct 31, 2008
7
GB
Hello,

I've been following the tutorial at to create a parameter query that calls a form containing a combo box.

However, when running the query, the form doesn't appear, and all I get is a normal text query box containing the criteria code.

Here is the code I'm running in the criteria of the query:

[Forms]![Form Project Status]![cboStatus]

Here is a screenshot of what happens with the query is run:
The appropriate form (Form Project Status) is setup and working in the database and when viewed contains the correct combo box (called cboStatus).

Unfortunately, this form isn't appearing when the query is run.

Any ideas what is happening here?

Thanks in advance!

Jamie
 
Why not run the query from the form ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
The simple answer to that is, I'm not sure how.

My knowledge of Access is very basic.

The tutorial I followed to do this seems to show exactly what I'm trying to achieve, but despite following every step perfectly, it isn't working. (I'm assuming there's some naming problem that's causing the issue).

Disregarding the problem, here is what I'm trying to achieve:

When running a query, rather than having to manually type in the criteria in a text box, I want to provide a drop down menu of options to choose from.

Jamie
 
So, you have a form with the combo.
In this form you add a button with a Click event procedure lauching the query:
DoCmd.OpenQuery "yourQueryName"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Surely that will just open the standard text box query though, rather than using the value in the combo as the selection?

For what it's worth, I've just setup a new, very basic database to try and do this in a clean environment with no other forms, tables etc to get in the way, and I'm getting the same problem.

This clean database can be downloaded at
I truly believe this must be something very simple I'm doing wrong, because it's really a very simple task. Maybe somebody could spare two minutes to check that small database to see where the issue is?

I appreciate your help, PHV, but I'm keen to stick to this method of doing it because that's the one that's the way I've been following in the tutorial and is shown to work in the tutorial.

Thanks!

Jamie
 
Hey PHV,

It looks like I stand corrected. Your idea of using the query in the form seemed to work just fine.

I'm still not sure why the query wasn't working as intended, but I can forget about that now and use your method.

Thanks a lot for your help!

Jamie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top