Forum Discussion

Seanarm1234's avatar
Seanarm1234
Copper Contributor
May 05, 2023

Integrity in my tables

I am making a database for a veterinary clinic. when entering data into the appointments table, I need it to limit what can be entered for PetID based on CustomerID so that pets aren't listed with the wrong owners. Any Suggestions?

  • XPS35's avatar
    XPS35
    Iron Contributor

    Seanarm1234 There is no need to store the customerID in the appointment table. If you just store the petID, you can find the customer through the pet table. You can show the customer on the appointment form and use that to find a pet for a new appointment. Search for "cascading comboboxes" to find examples.

     

    One more point. What if a customer wants to make an appointment for two or more pets? 

Share