Dumb subform question

  • Thread starter Thread starter Suzette
  • Start date Start date
S

Suzette

Hi,

Alas, it's been a little while since I've done subforms in Access. After
perusing the help and all that fun stuff, I'm stumped so I thought it would
be best to go to those who know what's happening. I have a subform in use
and would like the user to be able to switch between datasheet view and form
view. Is that possible? I looked on the toolbar and the datasheet button
is not available (when it is in form view).

Thanks,

Suzette
 
Suzette said:
Hi,

Alas, it's been a little while since I've done subforms in Access.
After perusing the help and all that fun stuff, I'm stumped so I
thought it would be best to go to those who know what's happening. I
have a subform in use and would like the user to be able to switch
between datasheet view and form view. Is that possible? I looked on
the toolbar and the datasheet button is not available (when it is in
form view).

You can put a button on the main form that has these lines in its Click
event:

Me!SubformControlName.SetFocus
RunCommand acCmdSubformDatasheet

(where "SubformControlName" is the name of the subform control on the
main form, which is not necessarily the same as the name of the form
object it displays). That will toggle the subform between form view and
datasheet view.
 
Thank you thank you. I knew it could be done but couldn't figure it out.

Suzette
 

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

Back
Top