Results 1 to 5 of 5
  1. #1
    scewing is offline Novice
    Windows 11 Access 2016
    Join Date
    Aug 2024
    Posts
    1

    Table Structure


    A coworker has asked me to review their Access database they're building (Access 2016), and I'm not sure if there's a problem with it (I think there is).
    The main table (Employees) is for employee information, and it has about 12 fields. The problem (I think) is that pretty much every field is a foreign key linking it to another table (about 12 tables in all), and each of those tables really only has one field.
    Example: In the main table there is a field called status. It is a foreign key to another table called Status, and that table only has a primary key and a field called "status" with 4 or 5 entries (active, retired, pending, etc.).

    Am I wrong in thinking they should just make these fields in the main table?

  2. #2
    madpiet is offline Expert
    Windows 10 Office 365
    Join Date
    Feb 2023
    Posts
    564
    It sounds like the design is to keep the users from entering random data (well, data that's not in one of those lookup tables). So what you do is create a form and change all the textboxes for the fields where users can enter data into comboboxes and then base the comboboxes on the relevant lookup table.
    The pattern is like this: each combobox will have 2 columns, one for the value being stored (the "index" to the choice selected) and the other to show the value from the lookup table. Then you go into the column widths property and set it to "0;1" (first column is hidden, second is 1 inch wide... adjust to suit your needs). Then you just set the Limit to List property of each combobox to True.

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,421
    At first, I thought this was just a bunch of lookup tables (not lookup fields) but this part is suspect:
    The problem (I think) is that pretty much every field is a foreign key linking it to another table
    I can't picture how an employee's employee number, first name, middle name, last name, address, DOB, service date start, service date end, etc. would be set up that way. Those could be 8 of the 12 fields you say the table has, and none of those should be linked that way.

    Seeing a pic of the relationships window might be good.
    Last edited by Micron; 08-28-2024 at 08:03 AM. Reason: clarification
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    ano is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Nov 2023
    Posts
    204
    knowing text is easy wrong written and names are often family it is not wrong to have those names not in the main table
    and a name with more words can be easy added if the nametable has a sequence # behind it, and or function

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,552
    Not that strange.
    I have a table in my first ever Access DB called tblLinks.
    That is all it is, one Autonumber field and 4 link fields.
    That links
    Ships
    Crew
    Rank
    Date
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 10-12-2016, 06:57 AM
  2. Table Structure
    By ccordner in forum Database Design
    Replies: 22
    Last Post: 01-17-2012, 03:22 PM
  3. Help with Table Structure
    By medtech2 in forum Database Design
    Replies: 5
    Last Post: 10-14-2011, 05:43 PM
  4. Table Structure
    By riley73 in forum Database Design
    Replies: 5
    Last Post: 05-03-2011, 07:13 AM
  5. Table Structure
    By megabrown in forum Database Design
    Replies: 1
    Last Post: 11-18-2010, 04:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums