F
Frank Martin
I have a Statement Report based on a query which contain two parameters
"mmmyy" and "AddressesID".
I want to open this Report in preview, by selecting a customer from a combo
box (the row source contains a list of the relevant parameters) on my
invoice form.
I have to code this combo box to select the two parameters automatically,
with or without a command button.
If I use a command button then the Preview Report code (via the wizard) is:
**
Private Sub Command10_Click()
On Error GoTo Err_Command10_Click
Dim stDocName As String
stDocName = "RptSTATEMENT"
DoCmd.OpenReport stDocName, acPreview
Exit_Command10_Click:
Exit Sub
Err_Command10_Click:
MsgBox Err.Description
Resume Exit_Command10_Click
End Sub
**
Can someone help me with the best code to accomplish this?
Please help, Frank
"mmmyy" and "AddressesID".
I want to open this Report in preview, by selecting a customer from a combo
box (the row source contains a list of the relevant parameters) on my
invoice form.
I have to code this combo box to select the two parameters automatically,
with or without a command button.
If I use a command button then the Preview Report code (via the wizard) is:
**
Private Sub Command10_Click()
On Error GoTo Err_Command10_Click
Dim stDocName As String
stDocName = "RptSTATEMENT"
DoCmd.OpenReport stDocName, acPreview
Exit_Command10_Click:
Exit Sub
Err_Command10_Click:
MsgBox Err.Description
Resume Exit_Command10_Click
End Sub
**
Can someone help me with the best code to accomplish this?
Please help, Frank