this method works for me.
Private Function Process_Db_Command(StrSQlCommand As String)
On Error GoTo Unable_To_Process
Dim ConDB As Connection
Dim ConRS As ADODB.Recordset
Set ConDB = New Connection
ConDB.CursorLocation = adUseServer
ConDB.Open modStartUp.GlobalData.Get_SQL_Provider & App.Path &
"\contacts.mDb;"
Set ConRS = New Recordset
ConRS.Open StrSQlCommand, ConDB, adOpenStatic, adLockPessimistic
ConDB.BeginTrans
ConDB.Execute StrSQlCommand
If Left(StrSQlCommand, 6) = "SELECT" _
or left(StrSQLCommand,6) = "INSERT" Then
strPassName = ConRS.Fields("RecipientName").Value
strPassLetter = ConRS.Fields("LetterFileSent").Value
If IsNull(ConRS.Fields("CurrentStatus").Value) = True Then
ConRS.Fields("CurrentStatus").Value = 0
End If
dblPassCount = ConRS.Fields("CurrentStatus").Value
End If
ConRS.UpdateBatch adAffectAllChapters
ConDB.CommitTrans
ConRS.Close
ConDB.Close
Set ConRS = Nothing
Set ConDB = Nothing
Process_Db_Command = 0
Exit Function