C
Chip Melton
I am trying to print a Report from a button on a Form but i am using the
field 'SAVNUM' (SAV #) as the filter criteria. This way when someone is
looking at SAV # 4 on the form and hit the print button it prints out only
the Report for SAV# 4. Here is the code i am using, but when i hit the
print button it print-previews all the reports. Is there something i need
to do to the Query?
Private Sub Command20_Click()
On Error GoTo Err_Command20_Click
Dim stDocName As String
stDocName = "rpt_SAV"
DoCmd.OpenReport stDocName, acViewPreview, , SAVNUM = Me.SAVNUM
Exit_Command20_Click:
Exit Sub
I am just leaning VB so it is probably a simple mistake i have made!!!!
---- THANKS in advance!!!
field 'SAVNUM' (SAV #) as the filter criteria. This way when someone is
looking at SAV # 4 on the form and hit the print button it prints out only
the Report for SAV# 4. Here is the code i am using, but when i hit the
print button it print-previews all the reports. Is there something i need
to do to the Query?
Private Sub Command20_Click()
On Error GoTo Err_Command20_Click
Dim stDocName As String
stDocName = "rpt_SAV"
DoCmd.OpenReport stDocName, acViewPreview, , SAVNUM = Me.SAVNUM
Exit_Command20_Click:
Exit Sub
I am just leaning VB so it is probably a simple mistake i have made!!!!
---- THANKS in advance!!!