Results 1 to 10 of 10
  1. #1
    pmhb2011's Avatar
    pmhb2011 is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2020
    Posts
    15

    Pros and cons of table field value list vs lookup table

    Hi all,

    I've tried to google this but I'm obviously failing to find the right search terms

    Can someone please give me a rundown of the pros and cons of creating a separate lookup table vs having a value list? When would you use one over the other?

    Thanks!!
    Last edited by pmhb2011; 09-30-2020 at 07:50 PM. Reason: Made title more descriptive

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I can't remember the last time I used a value list. Maybe for something that would never change, like male/female. But of course in the current political climate, even that isn't a sure thing. The table is more dynamic and flexible.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,557
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Use a lookup/reference table, unless there is only 1 or 2 values for a value list.
    Easy to add or modify a lookup table.

  5. #5
    pmhb2011's Avatar
    pmhb2011 is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2020
    Posts
    15
    Quote Originally Posted by pbaldy View Post
    Maybe for something that would never change. . . . The table is more dynamic and flexible.
    Thanks for the feedback. That makes sense and aligns with what my hunch was.

    Quote Originally Posted by pbaldy View Post
    Maybe for something that would never change, like male/female. But of course in the current political climate, even that isn't a sure thing.
    Haha, sigh... To be fair, though, that's never really been a sure thing in every culture... I don't know about the current political climate (which feels aggressive, divisive, and toxic) but it's nice to see the fights for the rights of historically marginalised populations finally gaining some traction

  6. #6
    pmhb2011's Avatar
    pmhb2011 is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2020
    Posts
    15
    Quote Originally Posted by mike60smart View Post
    Thanks for the info.

    Um... I had to read that a couple of times and I'm still not sure if my head is around it properly.

    Can I clarify: Is that talking about what happens in the background of Access when you use the field value list function??

    It feels like something similar I read ages ago about why you shouldn't use the allow-multiple-values option because Access creates a bunch of complicated code and tables in the background so, even though it seems simpler, it really isn't.

  7. #7
    pmhb2011's Avatar
    pmhb2011 is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2020
    Posts
    15
    Quote Originally Posted by orange View Post
    Use a lookup/reference table, unless there is only 1 or 2 values for a value list.
    Easy to add or modify a lookup table.
    Thank you. That makes good sense.



    Follow-up question for anyone:

    Do you recommend using ID numbers or (since the values should all be unique anyway) using the values themselves as a natural key?

    I.e.,

    ID Colour
    01 Red
    02 Green
    03 Blue


    OR

    Colour
    Red
    Green
    Blue

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    That article argues against building lookup field in table, basically because of what happens 'in the background', regardless of whether the list is built from a table or values. To be fair, here is counterargument https://improvingsoftware.com/2009/1...cess-are-evil/
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    pmhb2011's Avatar
    pmhb2011 is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2020
    Posts
    15
    Quote Originally Posted by June7 View Post
    That article argues against building lookup field in table, basically because of what happens 'in the background', regardless of whether the list is built from a table or values. To be fair, here is counterargument https://improvingsoftware.com/2009/1...cess-are-evil/
    Thanks for clearing that up. The rebuttal article helped me make sense of the original article.

    I wasn't really considering making a foreign key into a lookup field, rather using the lookup field function to pre-enter a list of data options to avoid creating extra tables but I'm getting the sense that this is probably not the best way to go (especially if Access is doing that behind the scenes anyway)...

    Thanks everyone

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Yes, tables are much more flexible. Whether or not you build lookup field in table is different decision.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 6
    Last Post: 05-16-2020, 03:14 PM
  2. Replies: 9
    Last Post: 10-10-2019, 05:13 PM
  3. Replies: 5
    Last Post: 01-23-2015, 03:38 PM
  4. Replies: 5
    Last Post: 05-20-2014, 11:51 AM
  5. Lookup List in a Form for Table Record entry...
    By noaccessguru in forum Forms
    Replies: 1
    Last Post: 05-05-2011, 12:35 AM

Tags for this Thread

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