I have a data base used for cargo tracking. In cargo tracking we use multiple gps devices on a shipment. Each GPS Device (Tracker) is identified by a 4 digit number. The tracker will be assigned to the shipment in the database. When the shipment is complete the GPS Device (Tracker) is mailed back to me and I enter it as returned in the database. What I am trying to do is build a return form that will only display the record where the device number exists with out device returned check box is false.
I am able to search for the device but do not know how to have it filter by the Device return check box.
Here is a screen shot of the return form screen.
This is the VBA that I have at this point. Once again it will search for the tracker but I need it only to display the record that contains the GPS device that has not been checked returned in the Tracker Returned check box.
Private Sub txtSearch_AfterUpdate()
Dim strFilter As String
Dim sSearch As String
If Me.txtSearch <> "" Then
sSearch = "'*" & Replace(Me.txtSearch, "'", "''") & "*'"
strFilter = "[Tracker Assigned 1] Like " & sSearch & " OR [Tracker Assigned 2] Like " & sSearch & " OR [Tracker Assigned 3] Like " & sSearch
Me.Filter = strFilter
Me.FilterOn = True
Else
Me.Filter = ""
Me.FilterOn = False
End If
If Me.Recordset.RecordCount = 0 Then
If MsgBox("No Record Found") = vbNo Then
Me.FilterOn = False
txtSearch = Null
Exit Sub
End If
Me.FilterOn = False
Exit Sub
End If
With Me.txtSearch
.SetFocus
.SelStart = Len(Me.txtSearch)
End With
End Sub