Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

Relating a table to itself

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Drakemar - 11 Jan 2008 04:45 GMT
Hello, I'm developing an Access 2007 Database and I have the following
roadblock.  I have a table that needs to relation to itself, to
multiple rows.  Here is what I have:

Table1 - Words
ID autonumber
Word text

Table2 - WordTranslations
ID autonumber
WordsID  number  (fk of ID in words table)
SecondaryLanguageWordID  number  (fk of ID in words table)

Basically, the "Words" table consists of words from a few languages
and the "WordTranslations" table consists entries that are equivalent
but in different languages.  IE.  Table 1::   1 cat, 2 dog, 3 chat, 4
lizard.  So, Table 2 might look like::  1 1 3

How would I do this in Microsoft Access?

Thanks!
John W. Vinson - 11 Jan 2008 04:58 GMT
>Hello, I'm developing an Access 2007 Database and I have the following
>roadblock.  I have a table that needs to relation to itself, to
[quoted text clipped - 17 lines]
>
>Thanks!

You already did. <g>

Just join Table1.ID to Table2.WordsID in the relationship window. Then add
Table1 to the grid *again* - Access will alias it as Table11 (appending a 1 to
the name). Join this instance of ID to SecondaryLanguageWordID.

            John W. Vinson [MVP]
Drakemar - 11 Jan 2008 11:48 GMT
On Jan 11, 1:58 pm, John W. Vinson
<jvinson@STOP_SPAM.WysardOfInfo.com> wrote:

> >Hello, I'm developing an Access 2007 Database and I have the following
> >roadblock.  I have a table that needs to relation to itself, to
[quoted text clipped - 25 lines]
>
>              John W. Vinson [MVP]

Thanks for the reply.  It's good to know I was doing the right thing.
I got discouraged when I used the Database Configuration Wizard in
Visual Studio 2008 (C#) and it didn't have the alias table there.  So
it looks like one of the relations is missing.  This may be the wrong
forum for this, but would you happen to know if this is working as
intended or do I need to edit something in VS2008?
Drakemar - 11 Jan 2008 12:28 GMT
> On Jan 11, 1:58 pm, John W. Vinson
>
[quoted text clipped - 36 lines]
> forum for this, but would you happen to know if this is working as
> intended or do I need to edit something in VS2008?

Ah, I knew I posted that too fast.  Closer inspection of Visual Studio
2008 revealed that the two relations were visually represented on top
of each other.  It only looked like one was present, but they both
were.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.