A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Duplicate Field Names



 
 
Thread Tools Display Modes
  #1  
Old May 22nd, 2010, 03:18 AM posted to microsoft.public.access
.:RoKsTaR:.[_2_]
external usenet poster
 
Posts: 39
Default 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  
Old May 22nd, 2010, 04:13 AM posted to microsoft.public.access
Allen Browne
external usenet poster
 
Posts: 11,706
Default 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  
Old May 22nd, 2010, 04:53 AM posted to microsoft.public.access
.:RoKsTaR:.[_2_]
external usenet poster
 
Posts: 39
Default 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  
Old May 22nd, 2010, 05:56 AM posted to microsoft.public.access
Gina Whipp
external usenet poster
 
Posts: 3,500
Default 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  
Old May 22nd, 2010, 06:18 AM posted to microsoft.public.access
.:RoKsTaR:.[_2_]
external usenet poster
 
Posts: 39
Default 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  
Old May 22nd, 2010, 06:28 AM posted to microsoft.public.access
Gina Whipp
external usenet poster
 
Posts: 3,500
Default 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  
Old May 22nd, 2010, 02:03 PM posted to microsoft.public.access
Allen Browne
external usenet poster
 
Posts: 11,706
Default 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  
Old May 24th, 2010, 03:59 PM posted to microsoft.public.access
.:RoKsTaR:.[_2_]
external usenet poster
 
Posts: 39
Default Duplicate Field Names

Thanks, I'll check that out
  #9  
Old May 25th, 2010, 01:29 AM posted to microsoft.public.access
.:RoKsTaR:.[_2_]
external usenet poster
 
Posts: 39
Default 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  
Old May 25th, 2010, 03:24 AM posted to microsoft.public.access
Allen Browne
external usenet poster
 
Posts: 11,706
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:43 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.