I am creating a database of horses for my TAFE in ms access.
I have a horse table with horse, name and dam field. The dam is the female parent of the horse.
Appropriate data should be validated before it is accepted in the table:
- A horse must not be deleted if its a dam of an existing horse.
For example, Fionna cannot be deleted because she is Lara's dam. - A horse cannot be added that does not have an existing dam in the table
Code:
TblHorse:
HorseNo Integer (PK)
Name Text
Dam Text
Color Date
Gender Text
My table looks abit like this:
Horse Number / Name / Dam
585 / Lara / 458
658 / Pater / 288
584 / Mike / 323
458 / Fionna / 251
323/ Star/ 852
ETC....
How can I validate them in access?
Any help would be appreciated.