M
Minal
Hi,
I have a form and report both based on a the same query that asks for a
parameter input.
To open the form I have to input the parameter.
Once the form is open I have a button to print the report on click.
When I click the button it asks for the same parameter.
The code is
Private Sub Command_Click()
On Error GoTo Err_Command_Click
Dim stDocName As String
stDocName = "ReportName"
DoCmd.OpenReport stDocName, acNormal
Exit_Print_Click:
Exit Sub
Err_Command_Click:
MsgBox Err.Description
Resume Exit_Command_Click
End Sub
When I click this command button it asks for the same parameter
information that I have used to open the form.
What I would like for is that the report is printed for the parameter
that was used to open the form.
Can some one please help me.
Thanks
I have a form and report both based on a the same query that asks for a
parameter input.
To open the form I have to input the parameter.
Once the form is open I have a button to print the report on click.
When I click the button it asks for the same parameter.
The code is
Private Sub Command_Click()
On Error GoTo Err_Command_Click
Dim stDocName As String
stDocName = "ReportName"
DoCmd.OpenReport stDocName, acNormal
Exit_Print_Click:
Exit Sub
Err_Command_Click:
MsgBox Err.Description
Resume Exit_Command_Click
End Sub
When I click this command button it asks for the same parameter
information that I have used to open the form.
What I would like for is that the report is printed for the parameter
that was used to open the form.
Can some one please help me.
Thanks