Results 1 to 5 of 5
  1. #1
    Tambe257 is offline Novice
    Windows 7 32bit Access 2016
    Join Date
    Mar 2017
    Posts
    28

    Multi Input Filtering

    I have a basic form called WebAppExport that is showing results from a query called WebAppExportQry. The data are products in a chain of retail stores. (fields such as store number, item number, price, etc.) I currently have a search box that limits the results, based on searching the description, item number, or UPC code.



    I added a combobox called StoreCombo that lists all of the store numbers. I want to be able to choose a store number and then search only the records where StoreNum = the value in StoreCombo.

    Here is my search box info:

    There's a text box called txtSearch

    and a button called SearchBtn that has an onClick Macro with an ApplyFilter who's Where Condition =
    [ItemNameWeight] Like "*" & [Forms]![WebAppExport]![txtSearch] & "*" Or [ItemNum] Like "*" & [Forms]![WebAppExport]![txtSearch] & "*" Or [ItemUPCCode] Like "*" & [Forms]![WebAppExport]![txtSearch] & "*"

    I assume I need to add some code to the button onClick event that says to pull the StoreNum from the combobox and filter the form accordingly. Any suggestions how to do that properly would be appreciated.

  2. #2
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Have you considered altering the webappexportqry so that only data from storenum = 5 is shown when you select 5 from the combobox.

    Then the macro above neednt be touched and will do the same thing when you click the command button



    Sent from my iPhone using Tapatalk

  3. #3
    Tambe257 is offline Novice
    Windows 7 32bit Access 2016
    Join Date
    Mar 2017
    Posts
    28
    Do you mean dynamically using the combobox? If so, that's fine, but I'm not sure how to do that. If you mean just filtering the query, then that's not what I'm looking to do. I want to have our store managers all be able to look up product info, so I want the manager of store# 111 to choose his store# and then search for the product. Our stores are in many different locations and can have different prices, costs, vendors, etc. at each one.

  4. #4
    Tambe257 is offline Novice
    Windows 7 32bit Access 2016
    Join Date
    Mar 2017
    Posts
    28
    I figured it out on my own. Maybe this is what andy49 was referring to....

    In the query, I went to the filer criteria and used the builder to have the value from the combobox entered into the criteria. This simple tutorial was helpful:
    https://btabdevelopment.com/how-to-u...a-for-a-query/

  5. #5
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Not quite what I meant but glad you've sold it.


    Sent from my iPhone using Tapatalk

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

Similar Threads

  1. Multi-column filtering
    By DavidFleet in forum Access
    Replies: 1
    Last Post: 03-19-2015, 03:27 PM
  2. Replies: 1
    Last Post: 05-05-2014, 06:50 AM
  3. Multi filtering with comboboxes
    By petertje in forum Forms
    Replies: 4
    Last Post: 01-04-2014, 04:25 PM
  4. Replies: 5
    Last Post: 12-26-2013, 02:19 PM
  5. Replies: 1
    Last Post: 01-28-2011, 07:59 PM

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