A
Ayo
I have a form with a button to open a report that has 4 subreports. The
report is suppose to open with 2 values from the form and supposed to
determine the values displayed in the subform. But for some reason the values
are not even showing up in the main form. I used the following code, which I
have used many times on other occasions to much success. This is my first
time using it with subreports present on the form.
SummarySQL="SELECT * FROM [SITE LIST] WHERE ([Project Number]='" &
Me.cmbProjectNumber & "'" & " AND [Task Number]='" & Me.TaskNumber & "')"
Application.Echo False
DoCmd.penReport "CV_AC Summary", acViewDesign
Reports("CV_AC Summary").RecordSource=SummarySQL
DoCmd.Close acReport, "CV_AC Summary", acSaveYes
Application.Echo True
DoCmd.OpenReport "CV_AC Summary",acViewPreview
report is suppose to open with 2 values from the form and supposed to
determine the values displayed in the subform. But for some reason the values
are not even showing up in the main form. I used the following code, which I
have used many times on other occasions to much success. This is my first
time using it with subreports present on the form.
SummarySQL="SELECT * FROM [SITE LIST] WHERE ([Project Number]='" &
Me.cmbProjectNumber & "'" & " AND [Task Number]='" & Me.TaskNumber & "')"
Application.Echo False
DoCmd.penReport "CV_AC Summary", acViewDesign
Reports("CV_AC Summary").RecordSource=SummarySQL
DoCmd.Close acReport, "CV_AC Summary", acSaveYes
Application.Echo True
DoCmd.OpenReport "CV_AC Summary",acViewPreview