microsoft access help database programing developer
Back to Access Experts About Access Experts Access Experts Websites Access Experts Team Access Experts Services Access Experts Case Studies Access Expert Tips Contact Access Experts OUR BLOG
 
 
Part 1 Access ADP Tip: Using ADP ServerFilter property
by Juan Soto
06/03/2010

Use ServerFilter when loading forms in your ADP project.

Note: This is part one of a series of articles on Access ADP projects, to see the complete list and other articles please click here.

Where and Filter Clause do not work when using DoCmd.OpenForm Statement
One of the issues you will find when working with an Access Data Project, (ADP), is the lack of functionality in the Where and Filter clause of the DoCmd.OpenForm statement, they don't work with ADPs. There are two techniques you can use to overcome this limitation:

Set The Form's Record Source Property
On startup or during the course of using the form, you can set the form's record source property using the OpenArgs argument:
Me.RecordSource = "Select * from MyTable Where " & Me.OpenArgs

Use ServerFilter Property
Another method is to use the ServerFilter property of the form. On the open event you will need to use the following statements
Me.ServerFilter = ""
Me.ServerFilter = Me.OpenArgs
The first line is needed to reset the property before you set it to something else.


If you like this tip you will be delighted with our service! Call or write us today for a free quote regarding your computer needs.

Publish this article in your own corporate newsletter or publication! Contact us to obtain a free license.


Home | About Us Why PCExperts | Team | Services | Newsletter | Contact Us
Copyright © 2004