Help with Subform validation

agma

New member
Local time
Today, 16:58
Joined
Oct 18, 2020
Messages
1
I have this access database-sample. I would like to be able to validate the violation input. If the violation is before the car sold date, it is okay to input. Otherwise, I will get an error message trying to input this in the form.

For example, Junker Camaro is sold on 3/18/2000. In Violation tab, I would be able to input any violation less than that sale date.

Any help is greatly appreciate.

Thank you..
 
your Tables should have Autonumber fields (ID).
create a Violation table (tblViolation) with fields:

CarID (long, FK to Car table)
ViolationDate (Date)
Violantion (short text)

add code to the form's beforeupdate event to check if the car's violationdate > solddate.
see this sample.
 

Attachments

Users who are viewing this thread

Back
Top Bottom