C
channell
Hi, I have 1 button that I need to open two reports. I can get 1 report to
open how I need it, but it refuses to open the second report. I know it is
an issue with my coding, and I am not sure what to do next. It says
something about ambiguous commands, so i am not sure how to combine the two
codes together. Thanks for the help!
Here is my coding:
Private Sub CommandOpen6135r_Click()
On Error GoTo Err_CommandOpen6135r_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "r6135FOREMAIL"
stLinkCriteria = "[EMPLOYEE ID] = " & Me![EMPLOYEE ID]
DoCmd.Close
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
Exit_CommandOpen6135r_Click:
Exit Sub
Err_CommandOpen6135r_Click:
MsgBox Err.Description
Resume Exit_CommandOpen6135r_Click
End Sub
Private Sub CommandOpen6135r_Click()
On Error GoTo Err_CommandOpen6135r_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "r6135EMAIL"
stLinkCriteria = "[EMPLOYEE ID] = " & Me![EMPLOYEE ID]
DoCmd.Close
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
Exit_CommandOpen6135r_Click:
Exit Sub
Err_CommandOpen6135r_Click:
MsgBox Err.Description
Resume Exit_CommandOpen6135r_Click
End Sub
open how I need it, but it refuses to open the second report. I know it is
an issue with my coding, and I am not sure what to do next. It says
something about ambiguous commands, so i am not sure how to combine the two
codes together. Thanks for the help!
Here is my coding:
Private Sub CommandOpen6135r_Click()
On Error GoTo Err_CommandOpen6135r_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "r6135FOREMAIL"
stLinkCriteria = "[EMPLOYEE ID] = " & Me![EMPLOYEE ID]
DoCmd.Close
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
Exit_CommandOpen6135r_Click:
Exit Sub
Err_CommandOpen6135r_Click:
MsgBox Err.Description
Resume Exit_CommandOpen6135r_Click
End Sub
Private Sub CommandOpen6135r_Click()
On Error GoTo Err_CommandOpen6135r_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "r6135EMAIL"
stLinkCriteria = "[EMPLOYEE ID] = " & Me![EMPLOYEE ID]
DoCmd.Close
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
Exit_CommandOpen6135r_Click:
Exit Sub
Err_CommandOpen6135r_Click:
MsgBox Err.Description
Resume Exit_CommandOpen6135r_Click
End Sub