If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Duplicate Field Names
How do I get Access to allow me to have to fields with the same name? One of
my junction tables relates 2 things from the same table and I need to have the fields labeled the same. Cheers! |
#2
|
|||
|
|||
Duplicate Field Names
You cannot have 2 fields with the same name in the same table.
The fields don't need the same name for you to create relations to other tables. For example, say you have an Employee table, and a junction table to record who reports to whom when. The junction table would have fields: - EmployeeID relates to Employee.EmployeeID - SupervisorID relates to Employee.EmployeeID - StartDate when this employee starts to report to this supervisor. The idea is that, even though EmployeeID and SupervisorID both relate to the same field of the Employee table, they have different names in this junction table. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. ".:RoKsTaR:." wrote in message ... How do I get Access to allow me to have to fields with the same name? One of my junction tables relates 2 things from the same table and I need to have the fields labeled the same. Cheers! |
#3
|
|||
|
|||
Duplicate Field Names
Thanks Allen
So how would I work in my case? I need to establish a relationship between two or more people in my people table. My people table is simple: People - ID, Firstname, Lastname I'm relating the 2 or more in this table: Guardian - ID, Peopleid, peopleid, relationship, isprimary Cheers! |
#4
|
|||
|
|||
Duplicate Field Names
That table is set up like an Excel spreadsheet, so in your case that would
not work... Your table should be set up like this... Guardian - ID Peopleid relationship isprimary -- Gina Whipp 2010 Microsoft MVP (Access) "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm ".:RoKsTaR:." wrote in message ... Thanks Allen So how would I work in my case? I need to establish a relationship between two or more people in my people table. My people table is simple: People - ID, Firstname, Lastname I'm relating the 2 or more in this table: Guardian - ID, Peopleid, peopleid, relationship, isprimary Cheers! |
#5
|
|||
|
|||
Duplicate Field Names
How does that relate 2 people though?
"Gina Whipp" wrote: That table is set up like an Excel spreadsheet, so in your case that would not work... Your table should be set up like this... Guardian - ID Peopleid relationship isprimary -- Gina Whipp 2010 Microsoft MVP (Access) "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm ".:RoKsTaR:." wrote in message ... Thanks Allen So how would I work in my case? I need to establish a relationship between two or more people in my people table. My people table is simple: People - ID, Firstname, Lastname I'm relating the 2 or more in this table: Guardian - ID, Peopleid, peopleid, relationship, isprimary Cheers! |
#6
|
|||
|
|||
Duplicate Field Names
Oops, junction table...
***Modified Guardian - ID relationship isprimary ***Junction table GuardianID PeopleID -- Gina Whipp 2010 Microsoft MVP (Access) "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm ".:RoKsTaR:." wrote in message ... How does that relate 2 people though? "Gina Whipp" wrote: That table is set up like an Excel spreadsheet, so in your case that would not work... Your table should be set up like this... Guardian - ID Peopleid relationship isprimary -- Gina Whipp 2010 Microsoft MVP (Access) "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm ".:RoKsTaR:." wrote in message ... Thanks Allen So how would I work in my case? I need to establish a relationship between two or more people in my people table. My people table is simple: People - ID, Firstname, Lastname I'm relating the 2 or more in this table: Guardian - ID, Peopleid, peopleid, relationship, isprimary Cheers! |
#7
|
|||
|
|||
Duplicate Field Names
Take a look at this article:
People in households and companies - modelling human relationships at: http://allenbrowne.com/AppHuman.html Everyone (children, guardians, etc) goes into tblClient. For each grouping, you then create a record in tblGroup. Then tblGroupClient has a record for each person in the group. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. ".:RoKsTaR:." wrote in message ... Thanks Allen So how would I work in my case? I need to establish a relationship between two or more people in my people table. My people table is simple: People - ID, Firstname, Lastname I'm relating the 2 or more in this table: Guardian - ID, Peopleid, peopleid, relationship, isprimary Cheers! |
#8
|
|||
|
|||
Duplicate Field Names
Thanks, I'll check that out
|
#9
|
|||
|
|||
Duplicate Field Names
Ok, I sort of understand that, but am still a bit hazy. Could you explain why this won't work? right now I have a student table to take the peopleid and associate it with a studentid. Then I have a gaurdian table to associate a persion as a gaurdian and then show the relationship to a particular student. address - addressid, address, city, province, postalcode attendance – attendanceid, peopleid, lessondate, lessonstatus, lessonnotes phone- phoneid, phonenum, extension, phlocation email - emailid email, emailLocation, isprimary webservice – webserviceid, username, service people – peopleid, firstname, lastname products – productid, producttype, productdesc, price student – id, peopleid, lessonday, gender, DOB, iscurrent guardian – id, peopleid1, peopleid2, relationship, isprimary people_address – id, peopleid, addressid people_phone – id, peopleid, phoneid people_email – id, peopleid, emailed people_webservice – id, peopleid, webserviceid The deeper I get in this, the more I get confused |
#10
|
|||
|
|||
Duplicate Field Names
So you have a Student table and a Guardian table.
One student can have multiple guardians? One guardian can have multiple students. The simplest solution would therefore be to create a GuardianStudent table with fields: - GuardianID relates to Guardian.GuardianID - StudentID relates to Student.StudentID If a guardian has 3 students, they have 3 records in this table. If a student has 2 guardians, they have 2 records in this table. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. ".:RoKsTaR:." wrote in message ... Ok, I sort of understand that, but am still a bit hazy. Could you explain why this won't work? right now I have a student table to take the peopleid and associate it with a studentid. Then I have a gaurdian table to associate a persion as a gaurdian and then show the relationship to a particular student. address - addressid, address, city, province, postalcode attendance – attendanceid, peopleid, lessondate, lessonstatus, lessonnotes phone- phoneid, phonenum, extension, phlocation email - emailid email, emailLocation, isprimary webservice – webserviceid, username, service people – peopleid, firstname, lastname products – productid, producttype, productdesc, price student – id, peopleid, lessonday, gender, DOB, iscurrent guardian – id, peopleid1, peopleid2, relationship, isprimary people_address – id, peopleid, addressid people_phone – id, peopleid, phoneid people_email – id, peopleid, emailed people_webservice – id, peopleid, webserviceid The deeper I get in this, the more I get confused |
|
Thread Tools | |
Display Modes | |
|
|