G
Guest
I am creating a reservation form for a customer and I am at a stand still
trying to figure out how to only show the pets that are linked to the
customer. Let me explain:
Table 1 - Reservations:
*ReservationID - Auto Number
EmployeeID - linked to EmployeeTable (no problems with this)
CustomerID - linked to CustomerTable (no problems with this)
(there are also other fields but I'm not having issues with them).
Table 2 - CustomerTable:
*CustomerID - Auto Number
CustomerFirstName
CustomerLastName
(other info fields not having issues or linked with anything).
Table 3 - PetTable:
*PetId - AutoNumber
CustomerID (linked from CustomerTable on column two showing CustomerID,
Customerlastname, CustomerFirstName)
PetName
(other info fields not having issues or linked)
Table 4 - Reservation_Pet
*ReservationID
*PetID
I needed this table because not every pet from the customers would be
brought in for every reservation. (this is the only way I know to link
Multi-to-Multi fields)
I am attempting to put a form together for the Reservations.
It looks kind of like:
- Reservations -
ReservationID
Start
End
Total
CustomerID
(Customer details of last and first name are linked from CustomerID selected
in reservation form)
Subform: Reservation_Pet Subform
ReservationID
PetID
The PetID from the sub form is what I have a problem with. I want to ONLY
show the pets that are linked to the CustomerID from "Reservations" form and
"PetTable". I dont know the SQL to make this happen.
Any help would be appreciated.
Thanks,
John
trying to figure out how to only show the pets that are linked to the
customer. Let me explain:
Table 1 - Reservations:
*ReservationID - Auto Number
EmployeeID - linked to EmployeeTable (no problems with this)
CustomerID - linked to CustomerTable (no problems with this)
(there are also other fields but I'm not having issues with them).
Table 2 - CustomerTable:
*CustomerID - Auto Number
CustomerFirstName
CustomerLastName
(other info fields not having issues or linked with anything).
Table 3 - PetTable:
*PetId - AutoNumber
CustomerID (linked from CustomerTable on column two showing CustomerID,
Customerlastname, CustomerFirstName)
PetName
(other info fields not having issues or linked)
Table 4 - Reservation_Pet
*ReservationID
*PetID
I needed this table because not every pet from the customers would be
brought in for every reservation. (this is the only way I know to link
Multi-to-Multi fields)
I am attempting to put a form together for the Reservations.
It looks kind of like:
- Reservations -
ReservationID
Start
End
Total
CustomerID
(Customer details of last and first name are linked from CustomerID selected
in reservation form)
Subform: Reservation_Pet Subform
ReservationID
PetID
The PetID from the sub form is what I have a problem with. I want to ONLY
show the pets that are linked to the CustomerID from "Reservations" form and
"PetTable". I dont know the SQL to make this happen.
Any help would be appreciated.
Thanks,
John