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

Query over COMBO box on form

Status
Not open for further replies.

neilmoore

Technical User
Feb 19, 2001
1
GB
Hi

I have a form called search which contains a combo box called User. I am running a query over this with the following criteria;

[Forms]![SEARCH]![User]

Even though the form is open & there is data in the user field, I keep getting a message saying;

'Enter Parameter Value'
Forms!Search!User

I get this if I run the query from a button or if I run the query on the fly.

I have tried renaming the form, field, etc. but I am getting nowhere.

Please help!
 
What is the name of your combobox? If it is combo1 the use Me.combo1 rather that [Forms]![Search]![User]. You are on shaky ground with your naming convention. I'm not sure whether search or user may not be keywords.

Another way to handle this; I use it frequently, is to use the form filter and filteron properties. If the data you are looking for is bound to the form then these properties are very easy to manipulate in the code.

Me.Filter = "[User]=" & """" & Me.combo1 & """"
Me.FilterOn = True

Then merely setting the filteron property to false will display the entire set of data again.

Steve King
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top