Issue with junction table

C

ChrisJ

Is ther any reason why you have separate tables for
students and tutors?
If you merge the two - and perhaps include a field
(IdType) to indicate which is which - your problem should
dissapear.

-----Original Message-----
Hi guys.
I am building a database for my university and need to
keep track of students and tutors who are using the
carparks. My tables are as follows:
Tutors:
Tutor ID (PK - autonumber)
Name
License

Students:
Stud ID (PK)
Name
License

Registered Cars (Junction table):
Register ID (PK)
Date/Time
CarPark ID
Registration Number
User ID

Car Parks:
Car Park ID (PK)
Location

Cars:
Registration Number (PK)
Nationality
Make
MOdel
Colour

Relationships: (all one to many, tho it is a many to many
relationship, registered cars being the junction table)
Tutor ID (tutors) connected to User ID (Registered Cars)
Stud ID (students) connected User ID (registered cars)
Car Park ID (carparks) connected to Car park ID (registered cars)
REgistration number (cars) connected to Registration number (registered cars)

When i try to enter info into the registered cars table,
particularly in the field user id, i get the message:
'cannot add or change a record because a related record
is required in table tutors'. I have a combo box for the
field user id.
My questions: 1) i want the user id combo box to show
both the stud id and the tutors id when selected.
2) how do i stop the 'cannot add or change record'
message from appearing and let me update the field?
 
T

TC

Responding to the last suggestion (I have not read the whole thread):

That won't work for people who are students >and< tutors. For example, Fred
Smith, who is a student in course 'A', and also a tutor in course 'B'.

HTH,
TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top