My queries are built off a button that is clicked on my form and a combo box value(Customer). I need the combo box to refresh all, so when a new customer is selected and a button is clicked it will pull the correct query.
My queries are built off a button that is clicked on my form and a combo box value(Customer). I need the combo box to refresh all, so when a new customer is selected and a button is clicked it will pull the correct query.
I'm not sure what you mean by "pull the correct query"- when you select a new customer from the combo box, you want to determine a query to do what? If you want to change the query the form is based on, that's easy enough - just use Me.recordsource = somequery, and then Me.Requery.
But you'll have to provide a bit more detailed explanation of what you are trying to do.
I 1 form that has a combo box to select the customer. Once you select the customer there are 6 buttons that will stay the same for all customers. When a customer is selected from the combo box and one of the 6 buttons is clicked it will spit out a report off of a query criteria from the main form Customer(Combo Box) and Category(Buttons).
Once done with the report I have a back button that goes back to the main form. But when I change the customer in the combo box and select a different button the Report doesn't change from the previous customer.
If I hit refresh all manually it then changes and pulls the correct query.
I hope this helps get me a answer. Thanks for your time I greatly appreciate it!
Instead of refreshing your queries every time you select a new customer, have the queries point to the customer combobox, then the queries will never need to change.
As a criteria in your query for customer : =Forms!formname!customerfield