One to Many relationship Access 2010

suzemt

Registered User.
Local time
Today, 12:51
Joined
Oct 12, 2012
Messages
15
I am a fairly proficient user of MS Access, but am having trouble creating a one to many relationship between two tables, which I thought would be straight forward.
I want a table listing members of staff with their ID number. The next table will have an entry for each time they take sick leave (ID, start date, end date, reason).
I want to be able to find a member of staff and then show each entry on the second table that relates to a sick leave.

I understand about forms and subforms etc. I just cant seem to be able to get the relationship right. If I create the relationship using the staff ID, when I click on the link between the two table to edit the relationship, it will not give me the option to change it from a one to one.

In the staff table the ID is the primary key and in the second table I just set the primary key to Autonumber.
 
For your problem I suggest you the following model as a basis
 

Attachments

  • StaffSickLeave.png
    StaffSickLeave.png
    4.5 KB · Views: 245
.........In the staff table the ID is the primary key and in the second table I just set the primary key to Autonumber.
Not to patronize, but there's also a foreign key field in the second table? To which you connect the primary key in the staff table?
 
Please. I did say fairly proficient, so please patronise all you like. If helps, I am not proud:o

I will take a look at both suggestions.

Thanks for taking the time to get back.
 

Users who are viewing this thread

Back
Top Bottom