
Originally Posted by
RhinoBull
But you still have to have connection open so use it to execute your sql:
adoConnection.Exceute strSql
Here is what I did to get it to work. Thank you for all of your help.
Code:
Option Explicit
Dim strConn As ADODB.Connection
Dim sql As String
Private Sub cmdClearCache_Click()
'delete all records in tableX
Dim objDBaseConn
Set strConn = New ADODB.Connection
strConn.ConnectionString = "FILEDSN=mbdb_mb.dsn"
strConn.Open strConn
sql = "delete from tableX"
strConn.Execute sql
Set objDBaseConn = Nothing
End Sub
Jim