I want to search my database table for a certain record but the search is only when it is not the first record. If it is the first record the search code will not return true. Is there any adjustments I need to make to my Code so that even if the record is the first one it will return true
Code:
Private Function CheckIfVehicleTypeIsValid() As Boolean
Dim strCriteria As String
strCriteria = "TruckType=" & " '" & Trim(DataComboVehicleType.Text) & "' "
Set rstTrucks = New ADODB.Recordset
rstTrucks.Open "TruckTypes", Cnn, adOpenForwardOnly, , adCmdTable
rstTrucks.Find strCriteria, 1, adSearchForward
If rstTrucks.EOF Then
CheckIfVehicleTypeIsValid = False
Else
CheckIfVehicleTypeIsValid = True
End If
End Function