ServerFilter Property

  • Thread starter Thread starter Joe Delphi
  • Start date Start date
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
 
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.
 
Back
Top