Mike Hughes
Registered User.
- Local time
- Today, 11:11
- Joined
- Mar 23, 2002
- Messages
- 493
I have a command button on a form to run several queries. When I try to run it I get a Compile error: “Duplicate declaration in current scope”
For the line “Private Sub Command27_Click()”
Would someone please tell me what I'm doing wrong? Thanks
Private Sub Command27_Click()
On Error GoTo Err_Command27_Click
Dim stDocName As String
stDocName = "17 CASES WITH ALL DEP POT EMANC Q"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Dim stDocName As String
stDocName = " 18 CASES WITH ONE OR MORE CHILDREN UNDER 18 Q"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Dim stDocName As String
stDocName = "19 CASES WITH ALL DEP POT EMANC Without Matching 18 CASES WITH O"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Dim stDocName As String
stDocName = "20 CASES WITH ALL CHILDREN POTENTIALLY EMANCIPATED"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_Command27_Click:
Exit Sub
For the line “Private Sub Command27_Click()”
Would someone please tell me what I'm doing wrong? Thanks
Private Sub Command27_Click()
On Error GoTo Err_Command27_Click
Dim stDocName As String
stDocName = "17 CASES WITH ALL DEP POT EMANC Q"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Dim stDocName As String
stDocName = " 18 CASES WITH ONE OR MORE CHILDREN UNDER 18 Q"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Dim stDocName As String
stDocName = "19 CASES WITH ALL DEP POT EMANC Without Matching 18 CASES WITH O"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Dim stDocName As String
stDocName = "20 CASES WITH ALL CHILDREN POTENTIALLY EMANCIPATED"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_Command27_Click:
Exit Sub