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

Filter form data in VB code...

Status
Not open for further replies.

fperri

Programmer
Apr 25, 2007
8
US
I created a form that has two combo boxes at the top. The user has to select a value in each and then click "search". In the code for the button's onClick event I have put me.requery. Right now I have the form's recordsource property set to a query I created and saved in the database that pulls the values for each field I'm filtering on from the two combo boxes on the form. Once you click the search button, it displays a ton of fields and records but they all have the value #Name?

Any Ideas?
 
What is the controlSource of the controls on the form,
and what are the fields of the query?
Seems like they're not in sync., ...they must be identical!
 
That is what it was. I originally had the fields pulling from a table, then I changed it to a query and didn't change the control source. (DOPE!)

Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top