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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing a Combobox value to a Query

Status
Not open for further replies.

Timko

Programmer
Jul 20, 2004
5
GB
I have a form which contains a Combo Box list of countries. The form also has a button which when pressed (on click) runs a query to copy records from one table to another, using the following comand

DoCmd.OpenQuery "Upd_Data_Junc"

I want the query to copy only those records which have a country value equal to the value chosen in the Combo Box. I have included a criteria in the Query for the field Market_Abbr (country), the criteria is:

[Frm_Main].[Cmb_Market]

But when I press the button on the form I receive the message "Enter Parameter value....[Frm_Main].[Cmb_Market]"

I don't understand why the query is not recognising the value selected in the Combo Box.

I hope someone can help with this.
 
Code:
[COLOR=red]forms![/color][Frm_Main].[Cmb_Market]
 
Thank you. I knew it would be this simple!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top