Some code I was trying to use was:
Private Sub Case_Officer_AfterUpdate()
Dim db As Database
Dim recordset
Dim frm As Form_New_Case_Detail_Form
Dim Name As String
Dim Phone As String
Dim Office As String
Set db = CurrentDb()
Set recordset = db.OpenRecordset("tblCaseOfficer")
Set Name = frm.Case_Officer
recordset.Index = "Case Officer"
recordset.Seek "=", Name
If recordset.NoMatch = True Then
MsgBox "We have record of that name " & "with the last name " & Name
Else
MsgBox Matchmsg
End If
Set Phone = recordset.Index = "Phone Number"
Set Office = recordset.Index = "Office"
Let frm.Phone_Number = Phone
Let frm.Officer = Office
End Sub
This may explain better what I am trying to do. The code is obviousley not working correctly. Any ideas?
Cheers
Stuart