A
Angelsnecropolis
I have a combo box named "ReportList" and a button named "GenerateReport" on
a form. I'm trying to make the report selected in the combo box run when the
one button is pressed as opposed to making several buttons for each report.
I'm using the code below for a button for each report:
Private Sub GenerateReport_Click()
On Error GoTo Err_GenerateReport_Click
Dim stDocName As String
stDocName = "Takeovers - Kevin"
DoCmd.OpenReport stDocName, acPreview
Exit_GenerateReport_Click:
Exit Sub
Err_GenerateReport_Click:
MsgBox Err.Description
Resume Exit_GenerateReport_Click
End Sub
Thanks!
a form. I'm trying to make the report selected in the combo box run when the
one button is pressed as opposed to making several buttons for each report.
I'm using the code below for a button for each report:
Private Sub GenerateReport_Click()
On Error GoTo Err_GenerateReport_Click
Dim stDocName As String
stDocName = "Takeovers - Kevin"
DoCmd.OpenReport stDocName, acPreview
Exit_GenerateReport_Click:
Exit Sub
Err_GenerateReport_Click:
MsgBox Err.Description
Resume Exit_GenerateReport_Click
End Sub
Thanks!