Open Form from switchboard in Filter by Form mode

  • Thread starter Thread starter John C.
  • Start date Start date
J

John C.

I have a simple application in Access 2000 which currently
uses no macro's or special code.

What I want to do is devise a method whereby I can open a
form from the switchboard in Filter by Form mode.

I want to do this so that the form is in Query mode
instead of data entry mode.

Can anyone help with this or an appropriate alternate
method.

(p.s. if this takes a macro or special code, I'll ask that
you help very specifically as I have no coding experience).
 
If the form is always going to be opened in FilterByForm
mode then you can add some coding in the OnOpen action of
the form similar to what is seen below:

Private Sub Form_Open(Cancel As Integer)
DoCmd.OpenForm "YourFormName", acNormal, "", "", ,
acNormal
DoCmd.RunCommand acCmdFilterByForm
End Sub

Create your switchboard using the switcboard manager and
select the OpenForm option to open the appropriate form.

OR

You can create macro where the first action is OpenForm
(Select your form on the bottom) and the second action is
RunCommand (Select FilterByForm on the bottom). Save the
macro and using the switchboard manager, select the Run
Macro option to call the macro you just created.
 
Hey Now, Now this is what I'm talking about!!! It
worked! I used the macro approach and it worked like a
dream. Very cool, thanks Bob
 
Back
Top