form always opens in form view from switchboard

G

Guest

I have a form set to datasheet view only but when I open it from the
switchboard it always changes it to form view. Can I change this? In the
forms properties format tab under "Allow ...." I've only got the datasheet
view turned to YES.

Thx.
 
R

Rick Brandt

Ian said:
I have a form set to datasheet view only but when I open it from the
switchboard it always changes it to form view. Can I change this? In the
forms properties format tab under "Allow ...." I've only got the datasheet
view turned to YES.

For some silly reason...

DoCmd.OpenForm "FormName"

....will open a form in its default view UNLESS that default view is Datasheet.
You have to explicitly specify datasheet view as an argument.

DoCmd.OpenForm "FormName", acFormDS
 
G

Guest

Thnaks -- worked for a subform button on a main form but where do I find that
code from the switchboard?
 
R

Rick Brandt

Ian said:
Thnaks -- worked for a subform button on a main form but where do I find that
code from the switchboard?

Not sure. I never use the built in switchboard.
 

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