Ddisplay form in datasheet view using VB

J

JR_06062005

This is probably very simple, but can anyone tell me how to open a form in
data sheet view using VB. I've set the default view for the form to be
datasheet and when I double click on the form, it opens in datasheet view.
But when I use the code below to open the form it will not open in datasheet
view:

DoCmd.OpenForm stFormName

I've tried all kinds of options with OpenForm, but fails to open the form in
Datasheet View. Any help will be greatly appreciated.
 
J

JR_06062005

I've found the answer to my own question. The code is below if anyone is
interested:
DoCmd.OpenForm stDocName, acFormDS
acFormDS is the key.
 
Top