Thanks for your reply. I do appreciate your giving it some thought. However, I have been able to figure this one out with some code that I found and manipulated.
Code:
Sub LogOut()
'Add a reference to the Microsoft ActiveX Data 2.8 or later Object Library
'via the Tool | References... in the VB-editor
Dim cnt As ADODB.Connection
Dim rst As ADODB.Recordset
Dim stDB As String
Dim stCon As String
'Instantiate the ADO COM's objects.
Set cnt = New ADODB.Connection
Set rst = New ADODB.Recordset
'Pathway and name of the database
stDB = "T:\Trad\Data\db_StopLoss.mdb"
'Create the connectionstring.
stCon = "Provider=Microsoft.Ace.OLEDB.12.0; Persist Security Info = False;" & _
"Data Source=" & stDB & ";"
'Open the connection
cnt.Open stCon
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Find and Update the record in Access
With rst
.Index = "PrimaryKey"
.CursorLocation = adUseServer
.Open "tbl_QuoteLog", cnt, 1, 3, adCmdTableDirect
.Seek Range("CaseNum").Value
If Not rst.EOF Then
.Fields("UndWrite") = Sheets("LogOut").Range("b9").Value
.Fields("Status") = Sheets("LogOut").Range("b11").Value
If Sheets("LogOut").Range("k2") = "p" Then
.Fields("QtDeadDt") = Sheets("LogOut").Range("b12").Value
End If
.Fields("SpecDed") = Sheets("LogOut").Range("b13").Value
.Fields("EmpNum") = Sheets("LogOut").Range("b14").Value
.Update
Else
MsgBox "Log Out Failed"
End If
End With
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Close the recordset and close the connection.
rst.Close
cnt.Close
Set cnt = Nothing
Set rst = Nothing
End Sub