Access, switchboard, forms

T

tom

I set my form to datasheet view. However when I use the switchboard it
appears as single form. Can this be changed? Thanks.
 
F

fredg

I set my form to datasheet view. However when I use the switchboard it
appears as single form. Can this be changed? Thanks.

Is this switchboard one you created yourself, using command buttons to
navigate to various objects.

Regardless of the form's Default View setting being Datasheet View,
when opening a form using code you MUST specify Datasheet view:
DoCmd.OpenForm "FormName", acFormDS

Simply add acFormDS to your existing code, as above.

However, if you have used the built-in switchboard manager to create
the switchboard, while you still must use acFormDS it's a bit
trickier.

You need to open the switchboard form's code window and manually add a
constant to the list in the Private Function HandleButtonClick(intBtn
As Integer) function:
Const conCmdOpenFormDatasheet = 10

Then further down in this same function, in the Select Case area, add
these 2 lines:

Case conCmdOpenFormDatasheet
DoCmd.OpenForm rs!Argument, acFormDS

Save the changes.
Open the Switchboard Items table.
Change the Command value from 2 or 3 to 10 for the form you wish to
open in datasheet view.

Note. You will not be able to edit these values using the switchboard
manager. You need to do it manually, as above.
 

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

Similar Threads


Top