Subform control

  • Thread starter smcgrath via AccessMonster.com
  • Start date
S

smcgrath via AccessMonster.com

I have a command button on a subform to preview a report. When I close the
print preview the main form is displayed. Is it possible to return to the
tabbed subform page instead. I have three more print preview commands on the
subform.

Would you put code on the OnClose event of the report? Something like
setfocus to the subform control? I've searched all over and can't find the
answer.
 
S

Svetlana

Private Sub Report_Close()
Forms!NameOfMainForm!NameOfTab.Pages(#).SetFocus
End Sub
where # is the order of the page minus 1
 
S

smcgrath via AccessMonster.com

I still end up on the main form page. It is a two tabbed form. I want to go
to the 2nd tab so I put in 1 and still ended up at the main form page.
 
S

smcgrath via AccessMonster.com

Because it is a tabbed form that is too large for the screen I need to have
an On Activate code to set focus to the fist combobox. Is there a way to
lose this focus after I print and close a report. I really don't want to
change the print command buttons from being on the subform. Or could I change
the on Activate code to the on Open?
 

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

Top