Subform control

  • Thread starter Thread starter smcgrath via AccessMonster.com
  • Start date 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.
 
Private Sub Report_Close()
Forms!NameOfMainForm!NameOfTab.Pages(#).SetFocus
End Sub
where # is the order of the page minus 1
 
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.
 
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?
 
Back
Top