Table relationships

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nicolae Fieraru

    #1

    Table relationships

    Hi All,

    I am working on a database which has over 30 tables and they have
    relationships between them. Sometimes I notice that in the forms I get the
    information which I don't need. For example, I get CityID instead of
    CityName. I can easily find out what table contains CityID displayed in my
    form, but I don't know how to find if there is a table which has CityID and
    CityName. If I can find, I then can show the CityName in the form, instead
    of CityID.
    I don't know if such a table to contain CityName even exist. Maybe there is
    a way to show all the tables which have CityID as a field in them? If I can
    see them, at least I can go only through those ones, instead of all the
    tables.
    I think it can be done with some VBA code, using the TableDefs. But maybe
    there are better ways of doing it

    Any help appreciated.

    Regards,
    Nicolae




  • Roger

    #2
    Re: Table relationships

    in access97, goto tools -> analyze -> documenter
    select the 'tables' tab
    click 'select all'
    click the 'options' button and select relationships & 'name, data types and
    size'
    save the resulting report as a word document and search at will


    "Nicolae Fieraru" <nospam@please. cxm> wrote in message news:<40da7b66$ 1@duster.adelai de.on.net>...[color=blue]
    > Hi All,
    >
    > I am working on a database which has over 30 tables and they have
    > relationships between them. Sometimes I notice that in the forms I get the
    > information which I don't need. For example, I get CityID instead of
    > CityName. I can easily find out what table contains CityID displayed in my
    > form, but I don't know how to find if there is a table which has CityID and
    > CityName. If I can find, I then can show the CityName in the form, instead
    > of CityID.
    > I don't know if such a table to contain CityName even exist. Maybe there is
    > a way to show all the tables which have CityID as a field in them? If I can
    > see them, at least I can go only through those ones, instead of all the
    > tables.
    > I think it can be done with some VBA code, using the TableDefs. But maybe
    > there are better ways of doing it
    >
    > Any help appreciated.
    >
    > Regards,
    > Nicolae[/color]

    Comment

    • Nicolae Fieraru

      #3
      Re: Table relationships

      Hi Roger, thank you very much. I will do that


      Comment

      • rkc

        #4
        Re: Table relationships


        "Nicolae Fieraru" <nospam@please. cxm> wrote in message
        news:40da7b66$1 @duster.adelaid e.on.net...[color=blue]
        > Hi All,
        >
        > I am working on a database which has over 30 tables and they have
        > relationships between them. Sometimes I notice that in the forms I get the
        > information which I don't need. For example, I get CityID instead of
        > CityName. I can easily find out what table contains CityID displayed in my
        > form, but I don't know how to find if there is a table which has CityID[/color]
        and[color=blue]
        > CityName. If I can find, I then can show the CityName in the form, instead
        > of CityID.
        > I don't know if such a table to contain CityName even exist. Maybe there[/color]
        is[color=blue]
        > a way to show all the tables which have CityID as a field in them? If I[/color]
        can[color=blue]
        > see them, at least I can go only through those ones, instead of all the
        > tables.
        > I think it can be done with some VBA code, using the TableDefs. But maybe
        > there are better ways of doing it[/color]

        Paste the following into the SQL view of the Query Builder:

        SELECT MSysRelationshi ps.szObject &" ("
        & MSysRelationshi ps.szColumn & ") <---> "
        & MSysRelationshi ps.szReferenced Object
        & "("& MSysRelationshi ps.szReferenced Column&")" as relationships
        FROM MSysRelationshi ps
        ORDER BY MSysRelationshi ps.szObject;






        Comment

        Working...