Results 1 to 4 of 4
  1. #1
    dave1962 is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    5

    Create a macro to apply a filter sort


    Hi there can any one help with this. Years ago I did a database which i no longer have to copy off. It had a form with all the information on. On that form I added a macro button which allowed to filter by form. So it cleared about 20 fields then you could select several to set the search criteria. On the menu bar I had a macro button to apply a the filter sort and to save that sort as a query named search which could be used to create reports.
    So I've managed to make a macro button which "allows the filter by form. How do I create a macro to apply the filter and save it as a query named "search".

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    instead of a macro, you can use 1 line of VB :

    FilterOn = false

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Sounds like you are trying to create more of a search form as opposed to just filtering. If so, take a look here
    http://allenbrowne.com/ser-62.html
    for an example. Under Tips for Serious Users you will also find something on applying a filter where a subform is used. It may not apply to you, but it will show the code lines for setting and applying a form filter. The whole site is probably worth your time.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    dave1962 is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    5
    Thanks I'll have a look at that

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

Similar Threads

  1. Replies: 5
    Last Post: 12-01-2016, 02:22 PM
  2. Replies: 3
    Last Post: 02-23-2015, 11:57 AM
  3. Replies: 4
    Last Post: 07-11-2014, 05:51 AM
  4. Macro to apply filter to form
    By mattzkn in forum Macros
    Replies: 3
    Last Post: 12-11-2013, 12:57 AM
  5. Replies: 1
    Last Post: 04-28-2013, 09:43 PM

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