Results 1 to 6 of 6
  1. #1
    jamesscully is offline Novice
    Windows 10 Office 365
    Join Date
    Jun 2022
    Posts
    2

    Question Help with filters


    Hi, I am an amateur who has written a few Access databases for my business, very complicated and difficult but the end result is worth the effort. I am struggling with filters. I want to apply a simple filter to my datasheets whenever I open them, and once they are open I want to be able to apply different filters using the built in filter options. What is the simplest way to set a filter that is applied whenever the datesheet is opened or get the focus? I use a tabbed "home page", each tab displays a different datasheet, so not sure if this means they are all datasheets are "open" when I start up the database. Im strictly queries and macros, no code! Please help!!

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    5,007
    Use the Access built in filtering. Right click on a control.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,446
    If you mean data sheet forms You can apply a filter when you open a form - it is the where parameter of docmd.openform

    A user can remove the filter once the form is open

    If you mean the data sheet view of a table or query, you can set it as a property - but it cN be easily removed by accident

  4. #4
    jamesscully is offline Novice
    Windows 10 Office 365
    Join Date
    Jun 2022
    Posts
    2
    I do mean datasheet forms. Can you explain how/where I enter the parameter docmd.openform please. I have a field on that form called Order Status and I want the form to open with only orders with an "open" status showing.

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    5,007
    I have Google on this laptop.
    First link from the Google. https://docs.microsoft.com/en-us/off...docmd.openform
    Google. https://www.google.com/search?q=docm...hrome&ie=UTF-8

    However you say you have multiple datasheets?, so unless they all have the same field, this is not going to work?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,446
    You need a form to open another form - typically on a button click event . The event can use vba or a macro. I don’t use macros but pretty sure openform will be an option. Think there is a wizard which will open when you create the button to create the macro- just follow the prompts

    There are other ways - add a button to a ribbon or create a hot key macro but suspect these are not appropriate to your requirements

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

Similar Threads

  1. Filters
    By preveo in forum Forms
    Replies: 3
    Last Post: 03-30-2016, 11:54 AM
  2. A running sum and filters
    By Marin in forum Reports
    Replies: 4
    Last Post: 07-28-2013, 02:00 PM
  3. Help with filters
    By daltman1967 in forum Forms
    Replies: 5
    Last Post: 07-14-2011, 02:12 PM
  4. Query Filters
    By ellixer in forum Queries
    Replies: 2
    Last Post: 06-27-2011, 08:26 AM
  5. About filters
    By registan in forum Forms
    Replies: 12
    Last Post: 04-09-2011, 08:01 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