opening a form is datasheet view from a switchboard

G

Guest

Everytime i use a switchboard to open a form it opens the form n single form
view even though I have set the defualt view on the form to datasheet view.
Any solutions?
 
A

Allen Browne

You need to specify an optional argument of 3 to get this effect:
DoCmd.OpenForm "Form1", acFormDS
 
G

Guest

Thanks Allen - where does the 3 come in - or do I just use the code you have
included in your response?
 
A

Allen Browne

The constant acFormDS has the value 3.

In code, you can just use the line posted (replacing Form1 with the name of
your form).

If you are trying to store the parameters in a table, use the value 3.
 

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