linking by table description name

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • louishong@lycos.com

    linking by table description name

    i'm uisng a master database that has hundreds of tables and links. i
    would like to create a clean mdb file and only import/link tables from
    the master database where the description column is like "Project 1".
    is there a way to do that?

    every table has the description field populated so this is the
    cleanest way i can make a subset of the master table.

    any help would be appreciated.
  • Tom van Stiphout

    #2
    Re: linking by table description name

    On Thu, 6 Mar 2008 10:42:32 -0800 (PST), louishong@lycos .com wrote:

    I fear you're doing something wrong with your "hundreds of tables",
    but to answer your question: you can create a MakeTable query (see
    help file) in which you use a Where clause:
    Description = 'Project 1'
    That will put only the matching records in the new table. Then export
    that table to a new database.

    If you know VBA you can automate this process by looping over the
    Tabledefs collection, inspecting the tabledef.Fields collection for a
    field named Description, composing a SQL statement dynamically and
    executing it.

    -Tom.

    >i'm uisng a master database that has hundreds of tables and links. i
    >would like to create a clean mdb file and only import/link tables from
    >the master database where the description column is like "Project 1".
    >is there a way to do that?
    >
    >every table has the description field populated so this is the
    >cleanest way i can make a subset of the master table.
    >
    >any help would be appreciated.

    Comment

    • louishong@lycos.com

      #3
      Re: linking by table description name

      On Mar 7, 7:11 am, Tom van Stiphout <no.spam.tom7.. .@cox.netwrote:
      On Thu, 6 Mar 2008 10:42:32 -0800 (PST), louish...@lycos .com wrote:
      >
      I fear you're doing something wrong with your "hundreds of tables",
      but to answer your question: you can create a MakeTable query (see
      help file) in which you use a Where clause:
      Description = 'Project 1'
      That will put only the matching records in the new table. Then export
      that table to a new database.
      >
      If you know VBA you can automate this process by looping over the
      Tabledefs collection, inspecting the tabledef.Fields collection for a
      field named Description, composing a SQL statement dynamically and
      executing it.
      >
      -Tom.
      >
      i'm uisng a master database that has hundreds of tables and links. i
      would like to create a clean mdb file and only import/link tables from
      the master database where the description column is like "Project 1".
      is there a way to do that?
      >
      every table has the description field populated so this is the
      cleanest way i can make a subset of the master table.
      >
      any help would be appreciated.
      I probably wasn't being clear enough. The description column is not a
      column in the tables but on the Tables object panel (Tables, Queries,
      Forms, Reports, Pages, Macros, Modules). When you select "Tables"
      you'll see following columns: Tables, Description, Modified, Created,
      Type. I want to filter on the description and pull a subset of the
      tables to a new MDB or delete other tables that does not meet the
      description criteria. I'm comfortable with VB so if someone has a
      code that can do this please help! I just don't see how to reference
      this metadata through code.

      Comment

      • Tom van Stiphout

        #4
        Re: linking by table description name

        On Mon, 10 Mar 2008 14:08:32 -0700 (PDT), louishong@lycos .com wrote:

        This works for me in the Immediate window:
        ?currentdb.Tabl eDefs("Customer s").Properties( "Descriptio n")
        "This is a test description"

        So you can access the Description property of the Tabledef object.
        Note that this property only occurs if a value has been set; if it is
        empty the property likely will not exist.

        -Tom.


        >On Mar 7, 7:11 am, Tom van Stiphout <no.spam.tom7.. .@cox.netwrote:
        >On Thu, 6 Mar 2008 10:42:32 -0800 (PST), louish...@lycos .com wrote:
        >>
        >I fear you're doing something wrong with your "hundreds of tables",
        >but to answer your question: you can create a MakeTable query (see
        >help file) in which you use a Where clause:
        >Description = 'Project 1'
        >That will put only the matching records in the new table. Then export
        >that table to a new database.
        >>
        >If you know VBA you can automate this process by looping over the
        >Tabledefs collection, inspecting the tabledef.Fields collection for a
        >field named Description, composing a SQL statement dynamically and
        >executing it.
        >>
        >-Tom.
        >>
        >i'm uisng a master database that has hundreds of tables and links. i
        >would like to create a clean mdb file and only import/link tables from
        >the master database where the description column is like "Project 1".
        >is there a way to do that?
        >>
        >every table has the description field populated so this is the
        >cleanest way i can make a subset of the master table.
        >>
        >any help would be appreciated.
        >
        >I probably wasn't being clear enough. The description column is not a
        >column in the tables but on the Tables object panel (Tables, Queries,
        >Forms, Reports, Pages, Macros, Modules). When you select "Tables"
        >you'll see following columns: Tables, Description, Modified, Created,
        >Type. I want to filter on the description and pull a subset of the
        >tables to a new MDB or delete other tables that does not meet the
        >description criteria. I'm comfortable with VB so if someone has a
        >code that can do this please help! I just don't see how to reference
        >this metadata through code.

        Comment

        • louishong@lycos.com

          #5
          Re: linking by table description name

          On Mar 10, 9:26 pm, Tom van Stiphout <no.spam.tom7.. .@cox.netwrote:
          On Mon, 10 Mar 2008 14:08:32 -0700 (PDT), louish...@lycos .com wrote:
          >
          This works for me in the Immediate window:
          ?currentdb.Tabl eDefs("Customer s").Properties( "Descriptio n")
          "This is a test description"
          >
          So you can access the Description property of the Tabledef object.
          Note that this property only occurs if a value has been set; if it is
          empty the property likely will not exist.
          >
          -Tom.
          >
          On Mar 7, 7:11 am, Tom van Stiphout <no.spam.tom7.. .@cox.netwrote:
          On Thu, 6 Mar 2008 10:42:32 -0800 (PST), louish...@lycos .com wrote:
          >
          I fear you're doing something wrong with your "hundreds of tables",
          but to answer your question: you can create a MakeTable query (see
          help file) in which you use a Where clause:
          Description = 'Project 1'
          That will put only the matching records in the new table. Then export
          that table to a new database.
          >
          If you know VBA you can automate this process by looping over the
          Tabledefs collection, inspecting the tabledef.Fields collection for a
          field named Description, composing a SQL statement dynamically and
          executing it.
          >
          -Tom.
          >
          i'm uisng a master database that has hundreds of tables and links. i
          would like to create a clean mdb file and only import/link tables from
          the master database where the description column is like "Project 1".
          is there a way to do that?
          >
          every table has the description field populated so this is the
          cleanest way i can make a subset of the master table.
          >
          any help would be appreciated.
          >
          I probably wasn't being clear enough. The description column is not a
          column in the tables but on the Tables object panel (Tables, Queries,
          Forms, Reports, Pages, Macros, Modules). When you select "Tables"
          you'll see following columns: Tables, Description, Modified, Created,
          Type. I want to filter on the description and pull a subset of the
          tables to a new MDB or delete other tables that does not meet the
          description criteria. I'm comfortable with VB so if someone has a
          code that can do this please help! I just don't see how to reference
          this metadata through code.
          THANK YOU TOM!!!

          Comment

          Working...