E
Elizabeth
I am trying to add a button to a form that will print a report showing detail
from that particular form. I have written a report that will show all of the
information as it would be seen on the form screen. However, I am having
trouble getting it to print the information for just one job. I have set up
an event procedure as follows:
Private Sub Print_JobEntry_Click()
On Error GoTo Err_Print_JobEntry_Click
Dim MyWhereCondition As String
MyWhereCondition = "JobID" = " & Me.JobID"
DoCmd.OpenReport " JobEntryJobQuery ", acViewPreview, , MyWhereCondition
Exit_Print_JobEntry_Click:
Exit Sub
Err_Print_JobEntry_Click:
MsgBox Err.Description
Resume Exit_Print_JobEntry_Click
End Sub
I can get the report to come up, but it does not have any information on it.
It simply has the labels. I have tried both making the underlying query
have criteria showing only one job and having the query with no criteria.
Can anyone please give me any suggestions on how to fix this so that the
report will actually show the information?
from that particular form. I have written a report that will show all of the
information as it would be seen on the form screen. However, I am having
trouble getting it to print the information for just one job. I have set up
an event procedure as follows:
Private Sub Print_JobEntry_Click()
On Error GoTo Err_Print_JobEntry_Click
Dim MyWhereCondition As String
MyWhereCondition = "JobID" = " & Me.JobID"
DoCmd.OpenReport " JobEntryJobQuery ", acViewPreview, , MyWhereCondition
Exit_Print_JobEntry_Click:
Exit Sub
Err_Print_JobEntry_Click:
MsgBox Err.Description
Resume Exit_Print_JobEntry_Click
End Sub
I can get the report to come up, but it does not have any information on it.
It simply has the labels. I have tried both making the underlying query
have criteria showing only one job and having the query with no criteria.
Can anyone please give me any suggestions on how to fix this so that the
report will actually show the information?