Open form in "Filter By Form" mode

A

Ant S

I want to open a form (using a command button) that opens a form in "Filter
By Form" mode. I am not a VB expert but can't find the option in the
Command button wizard or in a macro so I guess VB is the only option left.
Grateful for any help. The simpler the better :)

Thanks
 
J

Jon Lewis

Assuming there are other instances where the form needs to be opened in
normal mode then try something like:

In the command button's Click event open the form with an Open Argument
e.g.:
DoCmd.OpenForm "YourForm", , , , , , "FBF"

In the On Open event of your form:

If Me.OpenArgs = "FBF" Then
DoCmd.RunCommand acCmdFilterByForm
End If

HTH

in the Form's On Open event.
 

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