Results 1 to 4 of 4
  1. #1
    Datament is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2023
    Posts
    39

    Use a form to filter record from append query with changing criteria on a column

    I have a form f_Responses with a combobox cboCustomers for getting customer responses. There are two append queries "q_ClearCustomer" and "q_AppendCustomer" behind the On Click event of btn_GetStore.
    Table t_Customer has 50,000 records with 4 columns


    |When I need to process records identified as Cus002 I will select from cboCustomers in f_Responses which will populate txtCustomer. Then clicking btn_GetStore is suppose to populate f_Responses with Cus002 records.
    I created an append query with cus002 in the criteria of StoreName. I also have the following StoreName = "Cus002" in f_Customer Property Sheet filter.
    Do I have to go back to the append query change this criteria when I need to filter for Cus003 and others?
    All assistance would be greatly appreciated.

  2. #2
    madpiet is offline Expert
    Windows 10 Office 365
    Join Date
    Feb 2023
    Posts
    566
    No, instead of manually entering a parameter value in your query, you point at your combobox of the form.

    = Forms![f_Responses]![ComboboxName]

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Datament is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2023
    Posts
    39
    Many thanks. That worked. I was using a subform and did not reference it, but after referencing the subform it worked.

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

Similar Threads

  1. Replies: 3
    Last Post: 12-26-2020, 07:48 PM
  2. Replies: 2
    Last Post: 03-13-2018, 04:26 AM
  3. Reports - Manual Filter/Changing Criteria
    By DavidQMP in forum Access
    Replies: 2
    Last Post: 07-01-2016, 08:43 AM
  4. Changing Query Criteria from Form
    By dvgef2 in forum Queries
    Replies: 4
    Last Post: 06-24-2013, 12:14 PM
  5. Replies: 1
    Last Post: 02-03-2010, 08:17 AM

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