Hi, new to the forum but struggling with what is probably simple to sort!
I have a booking in form set up for work required on vehicles/trailers.
The fields in question are vehicles.regnumber and vehicles.fleet
The main ID is regnumber, I have this set to check the vehicles table to ensure that a matching record exists, I use the following dlookup
If IsNull(DLookup("[regnumber]", "[vehicles]", "[regnumber]= '" & Me.RegNumber & "'")) Then
MsgBox "Vehicle Record does not exist - Enter Vehicle details"
This works fine for vehicles, the problem I have is with trailers, in the vehicles table a trailer has a Reg number and Fleet number.
99% of the time the trailer will be booked in using it's fleet number, what I need to be able to do is:
When I enter the fleet number into the booking form I need it to check both the vehicles.regnumber and the vehicles.fleet fields to see if a record exists for that trailer.
Sorry if that was a bit long winded but I am trying to avoid having to answer questions as to why this or that etc.
kevinpreston