Hi.
I was wondering if anyone has come across this issue in MS Access 2000 when exporting a report to MS Word 2002 (PC is running Windows XP with Service Pack 2):
Modules: form (frmRouteByDate), query (qryRouteByDate) and report (rptRouteByDate).
I have a form that allows the client to select a commuter bus route from a ComboBox, which is loaded with route numbers from a table (there are 6 routes). There is also a calendar control for selecting an "as of date". The "Preview Report" command button on the form opens a report in preview mode. Here's the print code from the command button's Click procedure:
' Print preview the Route By Date Report.
Dim stDocName As String
stDocName = "rptRouteByDate"
DoCmd.OpenReport stDocName, acPreview
The report's Record Source is a query, which selects records from a table based on the route number ([Forms]![frmRouteByDate].[cboRouteNbr]) and "as of date" ([Forms]![frmRouteByDate].[calAsOfDT]) selected by the client via the form. In the report's heading I print the route number (Control Source: =Forms!frmRouteByDate.cboRouteNbr) and "as of date" (Control Source: =Forms!frmRouteByDate.calAsOfDT) using the form field values selected by the client. The print preview of the report lists the selected route and "as of date" in the heading, so far so good...
When the report gets exported to MS Word, the route number and "as of date" do not come across, i.e. the fields are blank in the output Word document. I'm not sure why those two fields are not being exported. Everything else on the report gets exported correctly.
Many thanks in advance for any insight, ideas, comments, etc.
Rich
I was wondering if anyone has come across this issue in MS Access 2000 when exporting a report to MS Word 2002 (PC is running Windows XP with Service Pack 2):
Modules: form (frmRouteByDate), query (qryRouteByDate) and report (rptRouteByDate).
I have a form that allows the client to select a commuter bus route from a ComboBox, which is loaded with route numbers from a table (there are 6 routes). There is also a calendar control for selecting an "as of date". The "Preview Report" command button on the form opens a report in preview mode. Here's the print code from the command button's Click procedure:
' Print preview the Route By Date Report.
Dim stDocName As String
stDocName = "rptRouteByDate"
DoCmd.OpenReport stDocName, acPreview
The report's Record Source is a query, which selects records from a table based on the route number ([Forms]![frmRouteByDate].[cboRouteNbr]) and "as of date" ([Forms]![frmRouteByDate].[calAsOfDT]) selected by the client via the form. In the report's heading I print the route number (Control Source: =Forms!frmRouteByDate.cboRouteNbr) and "as of date" (Control Source: =Forms!frmRouteByDate.calAsOfDT) using the form field values selected by the client. The print preview of the report lists the selected route and "as of date" in the heading, so far so good...
When the report gets exported to MS Word, the route number and "as of date" do not come across, i.e. the fields are blank in the output Word document. I'm not sure why those two fields are not being exported. Everything else on the report gets exported correctly.
Many thanks in advance for any insight, ideas, comments, etc.
Rich