open form in datasheet view

H

Heather

I have the default view set to datasheet and the following
on_open command:

DoCmd.OpenForm "yourForm", acFormDS

I get a run time error "you can't switch to a different
view at this time."

any suggestions?
 
A

Ashby

Your problem is confusing. If you already have the
default view set to datasheet, why are you trying to open
the form in datasheet view. This is very redundant. My
advise---lose the code.
 
Top