tatendatiffany
Board Regular
- Joined
- Mar 27, 2011
- Messages
- 103
I have a recordset that has an sql query and i am try to run that but it's not working. run this simple sql query and have the result displayed on sheet 1: column ac
"Dim rst As ADODB.Recordset
Dim rst1 As ADODB.Connection
Dim strSQL1 As String
strSQL1 = "SELECT COUNT (INUNACPT) FROM AIS3AM4.KTPT80T WHERE CDPRODCO=RETAIL_MAP"
With strSQL1
.Open strSQL1
Sheet1.Range("AC2").Activate
.Close
End With
End Sub"
PLEASE HELP ME
"Dim rst As ADODB.Recordset
Dim rst1 As ADODB.Connection
Dim strSQL1 As String
strSQL1 = "SELECT COUNT (INUNACPT) FROM AIS3AM4.KTPT80T WHERE CDPRODCO=RETAIL_MAP"
With strSQL1
.Open strSQL1
Sheet1.Range("AC2").Activate
.Close
End With
End Sub"
PLEASE HELP ME