Ddisplay form in datasheet view using VB

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
Back
Top