Help please. I have put some VBA code into my database to link and text boxes to different tables. The code works, but once I enter a Tracking Number that finds a NABP number I am unable to go to a dofferent record or save. I also want to edit the fields so I am unable to use a query since you cannnot edit queries. Here is the sample of my code.
Code:
Private Sub Form_AfterUpdate()
On Error Resume Next
Dim db As Database
Dim rs As Recordset
Dim ctl As Control
If Me.[Nature Investigation] = 1 Then
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT * " & _
"FROM Feedback " & _
"WHERE [NABP] = '" & Me.[Tracking Number] & "' ")
Me.[Request Title] = rs![PharmName]
' Me.[OptCaseSent] = 1
Me.[Date Received/Sent] = rs![Sent to CFI]
Me.[Requester Name] = 3
Me.[Request Type] = 2
rs.Close
Set rs = Nothing
Set db = Nothing
End If
End Sub
Help would be wonderful. This is driving me nuts.