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
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