On Open Event to open Datasheet when Form opens in Access

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

Guest

I need to have a datasheet open automatically when a form is opened in
Access. How do I do this?

I sure it is simple, have tried a few things (On Event) but I must be doing
it wrong.
 
lisedum said:
I need to have a datasheet open automatically when a form is opened in
Access. How do I do this?

I sure it is simple, have tried a few things (On Event) but I must be
doing
it wrong.

I'm not sure why you'd want to do this and I'm assuming that by "datasheet"
you mean a form in datasheet view but try this in your form's on open event:

DoCmd.OpenForm "frmMyDatasheet", acFormDS

where "frmMyDatasheet" is the name of your datasheet form.

Regards,
Keith.
www.keithwilby.com
 
Set the Default view of the form to Datasheet.
I need to have a datasheet open automatically when a form is opened in
Access. How do I do this?

I sure it is simple, have tried a few things (On Event) but I must be doing
it wrong.
 
In the first form's On Load place this code:

Private Sub Form_Load()
DoCmd.OpenForm "name of the second form"
End Sub

I'm curious why you want this.

It already is... I need it to open automatically when another form opens.
Set the Default view of the form to Datasheet.
[quoted text clipped - 3 lines]
 
Keith,
I didn't. I'm posting in AccessMonster and it doesn't refresh with NG
postings as they are posted. Your post that was a few minutes before mine
didn't show to me until after I posted and then I didn't read it.
I'm with you on the why do this!
 
Back
Top