print preview

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

Guest

i have a form that has tab controls named "VQC", "CCC" and "VHC". The print
preview icon is on the main form. If VQC is current, print preview should
open vqc_report, if CCC is current, it should open ccc_report and so on. What
should i place in my if and then statements?

If VQC ???? then
stDocName = "vqc_report"
else......

thanks!
 
If your Tab Control is named TabCtl99 then:

Select Case Me.TabCtl99.Pages(Me.TabCtl99).Name

Case "VQC"
stDocName = "vqc_report"
Case "CCC"
stDocName = "ccc_report"
Case "VHC"
stDocName = "vhc_report"
Case Else
End Select

DoCmd.OpenReport.....
 
thanks!

ruralguy via AccessMonster.com said:
If your Tab Control is named TabCtl99 then:

Select Case Me.TabCtl99.Pages(Me.TabCtl99).Name

Case "VQC"
stDocName = "vqc_report"
Case "CCC"
stDocName = "ccc_report"
Case "VHC"
stDocName = "vhc_report"
Case Else
End Select

DoCmd.OpenReport.....
 

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