I have a report (rpt_CustomerQuoteCategoryA) whose purpose is to display some information on a certain form (frm_GenerateQuoteCategoryA). The button on the form that opens this report has code to open the report as a preview, and to update all the text boxes on the report to correspond to the text boxes on the form. Here is the code:
Private Sub cmd_ViewReport_Click()
DoCmd.OpenReport "rpt_CustomerQuoteCategoryA", acViewPreview, , , acWindowNormal
Reports!rpt_CustomerQuoteCategoryA!txt_Price1 = Forms!frm_GenerateQuoteCategoryA!txt_Price1
Reports!rpt_CustomerQuoteCategoryA!txt_Price2 = Forms!frm_GenerateQuoteCategoryA!txt_Price2
Reports!rpt_CustomerQuoteCategoryA!txt_Price3 = Forms!frm_GenerateQuoteCategoryA!txt_Price3
When I run this code, the report opens but there is nothing in each text box. To make sure that access was reading the value, I added the following code:
Which verified that the value of the txt_Price1 text box was correct, but still does not display on the report.
Thanks for your help.