Solved

Use Built in Filters Access Form

Posted on 2014-02-20
3
309 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
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Some sers suddenly getting error popup msg 28 89
Restoring a form to its default settings 3 27
Access query expression 6 21
Access check if a table is open 4 43
This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
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…

803 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