print preview

B

benj

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!
 
R

ruralguy via AccessMonster.com

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.....
 
B

benj

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.....
 
Top