help with table design for Code Library

Discussion in 'Access Table Design' started by Jan T, Apr 4, 2012.

  1. Jan T

    Jan T Guest

    Hi. I am using MS Access 2010 and want to build a database for
    organizing my Code snippets and functions. I'd like to have different
    categories and subcategories in a form where I can build a tree-view
    kontroll on the very left side of the form. Then, when clicking in the
    tree, I want the relevant function names og procedure names appear in
    a table on the right side. Clicking that sub- or functionname, will
    make a new modular form, with the actual code, Show.

    My question is how do I build the tables.

    I started with two tables, one called tblCode with the following
    fields:
    ID
    HeaderID
    CodeName
    CodeText
    AuthorName

    and another table I named tblHeadings;
    HeadingID
    Heading

    How should I design the tables so that I can have a functioning tree
    with headings like:

    Excel
    |____ Worksheet
    |____ Cell
    |____ Fonts
    |____ Functions
    Outlook
    |____ Mail
    |____ Task
    |____ Contact
    |____ Exporting/Importing
    |____ Appoiment

    Any help is very much appriciated. Thanx in advance!

    Regards
    Jan T.
     
    Jan T, Apr 4, 2012
    #1
    1. Advertisements

  2. On 5/04/2012 7:39 AM, Jan T wrote:
    > Hi. I am using MS Access 2010 and want to build a database for
    > organizing my Code snippets and functions. I'd like to have different
    > categories and subcategories in a form where I can build a tree-view
    > kontroll on the very left side of the form. Then, when clicking in the
    > tree, I want the relevant function names og procedure names appear in
    > a table on the right side. Clicking that sub- or functionname, will
    > make a new modular form, with the actual code, Show.
    >
    > My question is how do I build the tables.
    >
    > I started with two tables, one called tblCode with the following
    > fields:
    > ID
    > HeaderID
    > CodeName
    > CodeText
    > AuthorName
    >
    > and another table I named tblHeadings;
    > HeadingID
    > Heading
    >
    > How should I design the tables so that I can have a functioning tree
    > with headings like:
    >
    > Excel
    > |____ Worksheet
    > |____ Cell
    > |____ Fonts
    > |____ Functions
    > Outlook
    > |____ Mail
    > |____ Task
    > |____ Contact
    > |____ Exporting/Importing
    > |____ Appoiment
    >
    > Any help is very much appriciated. Thanx in advance!
    >
    > Regards
    > Jan T.
    >


    Hi Jan

    You would need a minimum 3 tier table approach.

    Change the TierNames to suit your need

    Table.1
    txtTier1Id 'example = 1
    txtAppName 'example = Excel

    Table.2
    txtTier1Id 'example = 1
    txtTier2ID 'example = 1
    txtTier2Name 'example = Worksheet

    Table.3
    txtTier2ID 'example = 1
    txtTier3ID 'example = 1
    txtTier3Name 'example = Cell

    .......................................................

    Table.1
    txtTier1Id 'example = 1
    txtAppName 'example = Excel

    Table.2
    txtTier1Id 'example = 1
    txtTier2ID 'example = 2
    txtTier2Name 'example = Worksheet

    Table.3
    txtTier2ID 'example = 2
    txtTier3ID 'example = 2
    txtTier3Name 'example = Fonts

    .......................................................

    Table.1
    txtTier1Id 'example = 1
    txtAppName 'example = Excel

    Table.2
    txtTier1Id 'example = 1
    txtTier2ID 'example = 2
    txtTier2Name 'example = Worksheet

    Table.3
    txtTier2ID 'example = 2
    txtTier3ID 'example = 3
    txtTier3Name 'example = Functions

    ...........................................................

    Each tier will filter off the previous tier, Etc..... Depending on how
    many tiers you want to go.

    each of your tiers should only need to be a text field, with the
    exception of the actual code field as you would most likely need to use
    a memo field due to the 255 char restriction in text fields.

    Base your Parent form on Table.1, then each of the sub forms on each
    tiers table.2, table.3 etc.....

    I can't help you with a fancy tree view but this should get you started
    in the right direction.

    HTH
    Mick.
     
    Vacuum Sealed, Apr 5, 2012
    #2
    1. Advertisements

  3. Jan T

    Jan T Guest

    On Apr 5, 6:17 pm, Vacuum Sealed <> wrote:
    > On 5/04/2012 7:39 AM, Jan T wrote:
    >
    >
    >
    >
    >
    > > Hi. I am using MS Access 2010 and want to build a database for
    > > organizing my Code snippets and functions. I'd like to have different
    > > categories and subcategories in a form where I can build a tree-view
    > > kontroll on the very left side of the form. Then, when clicking in the
    > > tree, I want the relevant function names og procedure names appear in
    > > a table on the right side. Clicking that sub- or functionname, will
    > > make a new modular form, with the actual code, Show.

    >
    > > My question is how do I build the tables.

    >
    > > I started with two tables, one called tblCode with the following
    > > fields:
    > > ID
    > > HeaderID
    > > CodeName
    > > CodeText
    > > AuthorName

    >
    > > and another table I named tblHeadings;
    > > HeadingID
    > > Heading

    >
    > > How should I design the tables so that I can have a functioning tree
    > > with headings like:

    >
    > > Excel
    > >     |____ Worksheet
    > >           |____ Cell
    > >           |____ Fonts
    > >           |____ Functions
    > > Outlook
    > >      |____ Mail
    > >      |____ Task
    > >      |____ Contact
    > >            |____ Exporting/Importing
    > >      |____ Appoiment

    >
    > > Any help is very much appriciated. Thanx in advance!

    >
    > > Regards
    > > Jan T.

    >
    > Hi Jan
    >
    > You would need a minimum 3 tier table approach.
    >
    > Change the TierNames to suit your need
    >
    > Table.1
    > txtTier1Id 'example = 1
    > txtAppName 'example = Excel
    >
    > Table.2
    > txtTier1Id 'example = 1
    > txtTier2ID 'example = 1
    > txtTier2Name 'example = Worksheet
    >
    > Table.3
    > txtTier2ID 'example = 1
    > txtTier3ID 'example = 1
    > txtTier3Name 'example = Cell
    >
    > ......................................................
    >
    > Table.1
    > txtTier1Id 'example = 1
    > txtAppName 'example = Excel
    >
    > Table.2
    > txtTier1Id 'example = 1
    > txtTier2ID 'example = 2
    > txtTier2Name 'example = Worksheet
    >
    > Table.3
    > txtTier2ID 'example = 2
    > txtTier3ID 'example = 2
    > txtTier3Name 'example = Fonts
    >
    > ......................................................
    >
    > Table.1
    > txtTier1Id 'example = 1
    > txtAppName 'example = Excel
    >
    > Table.2
    > txtTier1Id 'example = 1
    > txtTier2ID 'example = 2
    > txtTier2Name 'example = Worksheet
    >
    > Table.3
    > txtTier2ID 'example = 2
    > txtTier3ID 'example = 3
    > txtTier3Name 'example = Functions
    >
    > ..........................................................
    >
    > Each tier will filter off the previous tier, Etc..... Depending on how
    > many tiers you want to go.
    >
    > each of your tiers should only need to be a text field, with the
    > exception of the actual code field as you would most likely need to use
    > a memo field due to the 255 char restriction in text fields.
    >
    > Base your Parent form on Table.1, then each of the sub forms on each
    > tiers table.2, table.3 etc.....
    >
    > I can't help you with a fancy tree view but this should get you started
    > in the right direction.
    >
    > HTH
    > Mick.- Hide quoted text -
    >
    > - Show quoted text -


    Hm, I found that a little static and may be I don't get it.
    This treeview must be dynamic, that is, it must be no
    problem to have only one or more than tree levels.

    But thank you anyway for taking the time.

    May be if I find a solution I would like to share it in this group.
    So I search on the net and found excactly what I was looking for.

    I will bulid my table like the table Employees in the Nortwind.mdb
    where Employees have a field RefersTo. I then will implement
    this idéa in my own project.

    For more information se the following article:
    http://support.microsoft.com/kb/209891/

    So, to make a form, I placed the Microsoft Treeview Contol 6 to
    the left of the form, and then a multiline text box to the right of
    the
    Userform. When clicking one of the nodes in the tree, the
    corresponding code is displayed in the text box to the right.

    The table design is therefor going to be like this I guess:

    tblCode
    ID
    HeaderID
    CodeName
    CodeText
    AuthorName

    And it is all in one single table. Hope this work. Have not
    tested it yet.

    BTW what does HTH stands for? (I always wondered?)

    Regards Jan T.
     
    Jan T, Apr 9, 2012
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim Cali

    Code library database help

    Tim Cali, Sep 12, 2003, in forum: Access Table Design
    Replies:
    0
    Views:
    80
    Tim Cali
    Sep 12, 2003
  2. Alice
    Replies:
    3
    Views:
    111
    Adrian Jansen
    Feb 16, 2004
  3. Jason

    Video Library design question

    Jason, May 5, 2004, in forum: Access Table Design
    Replies:
    1
    Views:
    72
    Allen Browne
    May 5, 2004
  4. Dave Venus

    Convert linked table design to local table

    Dave Venus, Jun 16, 2004, in forum: Access Table Design
    Replies:
    5
    Views:
    155
    Robin Proctor
    Jun 17, 2004
  5. Elise R via AccessMonster.com

    library design

    Elise R via AccessMonster.com, Jul 29, 2005, in forum: Access Table Design
    Replies:
    2
    Views:
    58
    Hermawih
    Jul 29, 2005
  6. CodeMonkey

    Table design question - Do I need to split this table up?

    CodeMonkey, Oct 11, 2007, in forum: Access Table Design
    Replies:
    7
    Views:
    172
    CodeMonkey
    Oct 13, 2007
  7. Mr C
    Replies:
    5
    Views:
    118
  8. JD McLeod

    Table Design or Report Design?

    JD McLeod, Jul 23, 2009, in forum: Access Table Design
    Replies:
    7
    Views:
    245
    Duane Hookom
    Jul 24, 2009
Loading...