P
Pamela
I was advised to create a query from which I can base a report. The report
(and so the query) needs to show info from approx 10 related tables. My
ultimate goal is to have a command button on a data entry form that when
clicked will print all of the data that was input for that record (in all
related tables) which is in the report I have. My query, however, is coming
up empty and therefore my report is blank. Are there any restrictions or
other aspects to this that I'm missing? Any suggestions or alternatives to
accomplishing this goal? Here is the code I have for the button:
Private Sub PrintrptAssn_Click()
On Error GoTo Err_PrintrptAssn_Click
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "rptAssignment", acViewPreview, , , , "[InspectionID] = " &
[InspectionID]
Exit_PrintrptAssn_Click:
Exit Sub
Err_PrintrptAssn_Click:
MsgBox Err.Description
Resume Exit_PrintrptAssn_Click
*Note, I have temporarily changed the code to just open the report for now
so that I don't keep printing blanks.
Any help anyone can give would be great! Thanks
(and so the query) needs to show info from approx 10 related tables. My
ultimate goal is to have a command button on a data entry form that when
clicked will print all of the data that was input for that record (in all
related tables) which is in the report I have. My query, however, is coming
up empty and therefore my report is blank. Are there any restrictions or
other aspects to this that I'm missing? Any suggestions or alternatives to
accomplishing this goal? Here is the code I have for the button:
Private Sub PrintrptAssn_Click()
On Error GoTo Err_PrintrptAssn_Click
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "rptAssignment", acViewPreview, , , , "[InspectionID] = " &
[InspectionID]
Exit_PrintrptAssn_Click:
Exit Sub
Err_PrintrptAssn_Click:
MsgBox Err.Description
Resume Exit_PrintrptAssn_Click
*Note, I have temporarily changed the code to just open the report for now
so that I don't keep printing blanks.
Any help anyone can give would be great! Thanks