Results 1 to 4 of 4
  1. #1
    abakhaus is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    9

    Refresh Queries off of Combo Box on Form


    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.

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    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.

  3. #3
    abakhaus is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    9
    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!

  4. #4
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    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

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 11
    Last Post: 08-06-2014, 09:47 AM
  2. Refresh default value for combo box
    By dmunsch in forum Programming
    Replies: 14
    Last Post: 03-18-2013, 12:35 PM
  3. Replies: 4
    Last Post: 05-04-2012, 02:03 AM
  4. Access Combo Box Refresh
    By gafoor in forum Forms
    Replies: 1
    Last Post: 03-04-2011, 04:00 AM
  5. Combo refresh
    By gafoor in forum Forms
    Replies: 0
    Last Post: 03-02-2011, 04:24 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums