Solved

Use Built in Filters Access Form

Posted on 2014-02-20
3
303 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 500 total points
Comment Utility
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
Comment Utility
Got you, i were just lazzzzy to built one myself !
thanks
0
 
LVL 20

Expert Comment

by:GrahamMandeno
Comment Utility
LOL!  Glad to help :-)
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now