Hallo all,
I need some help again!
I have main form with tab control with 4 pages.
On each t
Page I have a sub form with different data but all bound to the main form by a unique ID.
On each Page I have a Report Preview Button.
I have ONE Report design as the Info in the Sub-forms can all be linked to the same ID.
I use a recordset clone of the sub form from which the Report preview is clicked to fill a local table which is the source of the report.
NOW ALL I want to do is fill an unbound control on the report with the Caption of the Page it is printed from! (Active Page on Tab Control ?)I have tried the following code, but as the form is opened before the value for the unbound control is set, it doesn’t display unless I set the page margins or something!
stDocName = "TerminKalender_RPT"
DoCmd.OpenReport stDocName, acViewPreview
Reports!terminkalender_rpt!reptitle = Me.RUHE.Caption
Forms![termin_kalender_frm].Visible = False
Is there perhaps a way of finding out on the ON OPEN of the report, which is the active tab-control page and then filling in the unbound control with the caption?
Thanks a lot
Marion
I need some help again!
I have main form with tab control with 4 pages.
On each t
Page I have a sub form with different data but all bound to the main form by a unique ID.
On each Page I have a Report Preview Button.
I have ONE Report design as the Info in the Sub-forms can all be linked to the same ID.
I use a recordset clone of the sub form from which the Report preview is clicked to fill a local table which is the source of the report.
NOW ALL I want to do is fill an unbound control on the report with the Caption of the Page it is printed from! (Active Page on Tab Control ?)I have tried the following code, but as the form is opened before the value for the unbound control is set, it doesn’t display unless I set the page margins or something!
stDocName = "TerminKalender_RPT"
DoCmd.OpenReport stDocName, acViewPreview
Reports!terminkalender_rpt!reptitle = Me.RUHE.Caption
Forms![termin_kalender_frm].Visible = False
Is there perhaps a way of finding out on the ON OPEN of the report, which is the active tab-control page and then filling in the unbound control with the caption?
Thanks a lot
Marion