tatendatiffany
Board Regular
- Joined
- Mar 27, 2011
- Messages
- 103
someone please help me i have created a recordset which is suppose to run an sql but it is giving me an error "duplicate declaration in current scope".
all i have done is used: adodb.recordset again but what can i change it because i need abother recordset??
Public Sub Queries()
Dim rst As ADODB.Recordset
Dim rst As ADODB.Connection
Dim strSQL1 As String
strSQL1 = "SELECT COUNT (INUNACPT) FROM AIS3AM4.KTPT80T WHERE CDPRODCO=RETAIL_MAP"
.Open strSQL
Sheet1.range("AC2").CopyFromRecordset
.Close
End Sub
all i have done is used: adodb.recordset again but what can i change it because i need abother recordset??
Public Sub Queries()
Dim rst As ADODB.Recordset
Dim rst As ADODB.Connection
Dim strSQL1 As String
strSQL1 = "SELECT COUNT (INUNACPT) FROM AIS3AM4.KTPT80T WHERE CDPRODCO=RETAIL_MAP"
.Open strSQL
Sheet1.range("AC2").CopyFromRecordset
.Close
End Sub