Forms won't open in Datasheet view

S

SJM

I have created a few forms which have the following properties:

Default View: datasheet
Allow Form View: No
Allow Datasheet View: Yes
Allow PivotTable View: No
Allow PivotChart View: No

When I run the forms by themselves, they open correctly in Datasheet view
mode. However when the switchboard runs the same tables they always open in
Form view. I am using Access 2002, the datafile is in Access 2000 format,
and I sometimes use a workstation with Access 2003 on it to do some data
edits.

Steven
 
F

fredg

I have created a few forms which have the following properties:

Default View: datasheet
Allow Form View: No
Allow Datasheet View: Yes
Allow PivotTable View: No
Allow PivotChart View: No

When I run the forms by themselves, they open correctly in Datasheet view
mode. However when the switchboard runs the same tables they always open in
Form view. I am using Access 2002, the datafile is in Access 2000 format,
and I sometimes use a workstation with Access 2003 on it to do some data
edits.

Steven

To open a form in Datasheet view, from a command button on another
form, you must explicitly open it in Datasheet view:

If you are using your own custom made form with command buttons, code
the click event:
DoCmd.OpenForm "FormName", acFormDS

If you are using the Microsoft Built-in switchboard, it does not, as
default, support this.

You can open the form's code window and modify the code.
If this is what you are using, and need help, post back and I'll dig
the how-to out of my file.
 
S

SJM

fredg:

I am using the Microsoft Built-in switchboard, therefore I will need some
code help. Thanks!

Steven
 
F

fredg

fredg:

I am using the Microsoft Built-in switchboard, therefore I will need some
code help. Thanks!

Steven

*** snipped ***


Open the Switchboard Code window.

Find the
Private Function HandleButtonClick(intBtn As Integer)
code line.
A few lines down you'll find the Constants listed.
Add
Const conCmdOpenFormDS = 9
at the end of the list (I believe there are originally just 8
constants).

Then go down further into the Select Case statements.
Add

Case conCmdOpenFormDS
DoCmd.OpenForm rst!Argument, acFormDS

just before the Case Else statement.

Close the code window.

Open the Switchboard Items table.
Change the Command value for the form you wish to
open from it's current number (either 2 or 3) to 9.

That should do it.
You cannot make or edit this change using the Switchboard manager.
You must work around it, as above.
I would strongly suggest you make your own switchboard form using an
unbound form and adding command buttons. If you use the command button
wizard, Access will even write much of the code for you. Maintenance
will certainly be much easier, and you have better control over it's
appearance and what it will do.

Good Luck..
 

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