ServerFilter Property

J

Joe Delphi

Hi,

I have an MS Access form that retrieves data from an MS SQL Server
database. I need to query the database when I open the form and the query
criteria is dynamic so I can't just set it at design time. This used to be
an all MS Access program and I used to use this command with no problem:

DoCmd.OpenForm "frmTest", acNormal, , "[Plan] = '" & Plan & "' and [Ctr] =
'" & Ctr & "' and [Lvl] = '" & Lvl'", acFormEdit, acWindowNormal

But as far as I can tell, the OpenForm method sets the FILTER property and
not the SERVERFILTER property.

Anyone know how I can set the SERVERFILTER property when I open the form -
similar to what I am doing above? I tried setting it in the OnLoad event
of the form itself, but this had no effect. I suspect that the filter is
applied and data retrieved before this event is executed.

JD
 
B

Baz

Joe Delphi said:
Hi,

I have an MS Access form that retrieves data from an MS SQL Server
database. I need to query the database when I open the form and the query
criteria is dynamic so I can't just set it at design time. This used to be
an all MS Access program and I used to use this command with no problem:

DoCmd.OpenForm "frmTest", acNormal, , "[Plan] = '" & Plan & "' and [Ctr] =
'" & Ctr & "' and [Lvl] = '" & Lvl'", acFormEdit, acWindowNormal

But as far as I can tell, the OpenForm method sets the FILTER property and
not the SERVERFILTER property.

Anyone know how I can set the SERVERFILTER property when I open the form -
similar to what I am doing above? I tried setting it in the OnLoad event
of the form itself, but this had no effect. I suspect that the filter is
applied and data retrieved before this event is executed.

JD

What makes you think it's setting the Filter? When I do this, it sets the
ServerFilter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top