Problem Switchbboard and data sheet view

S

Steve

I have a button in the switchboard that opens a form showing a single record
form the table. I have set the form to Default View to Datasheet. When I
open the form, it open as a datasheet which is the way I want it. When I
open it with the swichboard button, it opens as a single record.

I'm missing something, how do I set the switcboard button to also open it as
a datasheet?

Thanks, Steve
 
J

Joseph Meehan

Steve said:
I have a button in the switchboard that opens a form showing a single
record form the table. I have set the form to Default View to
Datasheet. When I open the form, it open as a datasheet which is the
way I want it. When I open it with the swichboard button, it opens
as a single record.

I'm missing something, how do I set the switcboard button to also
open it as a datasheet?

Thanks, Steve

What exactly is that button doing? Is it running a macro (macros have
an option to open in datasheet) or code (how about posting that) or what?
 
F

fredg

I have a button in the switchboard that opens a form showing a single record
form the table. I have set the form to Default View to Datasheet. When I
open the form, it open as a datasheet which is the way I want it. When I
open it with the swichboard button, it opens as a single record.

I'm missing something, how do I set the switcboard button to also open it as
a datasheet?

Thanks, Steve
Regardless of the Default View setting of a form, if you wish to open
it from a command button event you MUST specify datasheet view.

Using code it would be:
DoCmd.OpenForm "FormName", acFormDS

If you are using the built in Access switchboard, you need to change
the code. Open the form's Code window.
Find the HandleButton_Click function and add the following to the list
of Constants:
Const conCmdOpenFormDS = 9

Then, further down in the code, add the following to the Select Case
statement:

Case conCmdOpenFormDS
DoCmd.OpenForm rst![Argument], acFormDS

Save the changes.
Open the Switchboard Items table. Find the table name that you wish to
open in datasheet view and change it's Command value from 3 to 9.
 
S

Steve

Thanks to all... I got it working with Fred directions.

Steve

fredg said:
I have a button in the switchboard that opens a form showing a single record
form the table. I have set the form to Default View to Datasheet. When I
open the form, it open as a datasheet which is the way I want it. When I
open it with the swichboard button, it opens as a single record.

I'm missing something, how do I set the switcboard button to also open it as
a datasheet?

Thanks, Steve
Regardless of the Default View setting of a form, if you wish to open
it from a command button event you MUST specify datasheet view.

Using code it would be:
DoCmd.OpenForm "FormName", acFormDS

If you are using the built in Access switchboard, you need to change
the code. Open the form's Code window.
Find the HandleButton_Click function and add the following to the list
of Constants:
Const conCmdOpenFormDS = 9

Then, further down in the code, add the following to the Select Case
statement:

Case conCmdOpenFormDS
DoCmd.OpenForm rst![Argument], acFormDS

Save the changes.
Open the Switchboard Items table. Find the table name that you wish to
open in datasheet view and change it's Command value from 3 to 9.
 

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