I have created a form that opens in the filter by form datasheet view
perfectly. However, when I added the form to the Switchboard it does
not open in datasheet view.
I have tried using a macro from the Switchboard to open the form.
Unsuccessful.
I have tried creating a form to open the filter by form from the
Switchboard. Unsuccessful.
Is it possible to open a 'filter by form' form from the Switchboard
in datasheet view?
It would have been appropriate for you to tell us "HOW" you are trying
to open the form in datasheet view. We can only guess.
To open a form in datasheet view using code, regardless of the form's
Default View, you MUST specifiy datasheet view.
DoCmd.OpenForm "FormName", acFormDS
If you are using an unbound form with command buttons, simply change
the Click event code to the above, substituting the actual form name.
However, if you used the Access Switchboard Manager to create the
switchboard, you can edit the Sub HandleButtonClick Switchboard code
to add another constant to the list. Use whatever value of the number
of constants already listed is, plus 1. I just don't remember if there
are 8 or 9 originally, so let's say your application currently shows 9
constants.
Add to that list:
Const conCmdOpenFormDS = 10
Then down in the Function HandleButtonClick event, add, just before
the Case Else statement:
Case conCmdOpenFormDS
DoCmd.OpenForm rsl[Argument], acFormDS
Then run the switchboard manager.
Add a new item to the page you wish it to appear on.
Use either of the 2 OpenForm commands (Add or Edit).
Enter the Form Name you wish to open in DataSheet.
Close the manager.
Open the Switchboard Items table.
Change the Command value for the form you wish to open from either 2
or 3 to 10.
I think I've remembered everything.
You will not be able to edit this item using the Manager.
It's a Pain. Best to use an unbound form with command buttons in place
of the Switchboard Manager. It's much, much easier to maintain and
modify.