Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Use Built in Filters Access Form

Posted on 2014-02-20
3
Medium Priority
?
319 Views
Last Modified: 2014-02-20
Hi, i would like to know if its possible to call the built-in filters which access uses for tables  \queries for forms
0
Comment
Question by:yidel718
  • 2
3 Comments
 
LVL 20

Accepted Solution

by:
GrahamMandeno earned 2000 total points
ID: 39875303
I'm not sure what you mean by "call the built-in filters".  Do you mean the drop-down filters in the header cells of a datasheet view?  And you want to "call" them from VBA code?

I don't think you can do this, and it makes no sense to do it.  This filter selection mechanism is part of the user interface and requires the user to make choices.  It makes no sense to automate it from code.

Of course, you can do a similar thing through code by setting the form filter - for example:
    Me.Filter = "[DateField]>=DateSerial(Year(Date(), 1, 1)"
    Me.FilterOn = True ' show this year's records only

Open in new window

Best wishes,
Graham Mandeno [Access MVP 1996-2014]
0
 
LVL 1

Author Comment

by:yidel718
ID: 39875312
Got you, i were just lazzzzy to built one myself !
thanks
0
 
LVL 20

Expert Comment

by:GrahamMandeno
ID: 39875423
LOL!  Glad to help :-)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question