Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSDE - Applying a filter to a form.

Status
Not open for further replies.

BlackKnight

Programmer
Oct 18, 2000
348
US
Hi folks,

I want to apply a filter to a form when it opens but in the help it says the filter property is ignored by SQL 7. I tried using the serverfilter property but it crashed Access.

I tried using the access method of docmd.openform "frmname",,,,"WHERE fldname=crteria" which refused to open the form unless I removed the filter argument.

The only solution I have found is to set the recordsource of the form during the form's open event.

Is this the only way? Any help would be appreciated. Yhanx in advance.

Have a good one!
BK
 
BK,

Don't include the word WHERE in the filter statement on the docmd.openform--just use the valid syntax:

Code:
    "frmname",,,,"fldname=crteria"


Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top