Results 1 to 2 of 2
  1. #1
    shkspeare is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2020
    Posts
    6

    boolean data values or 2 row item lists

    I've always used boolean values in tables, and then client-side code to get the corresponding text value.. (e.g. 0='open', 1='closed').



    Code:
    if me.boo = 0 then
     me.textbox = 'open'
    else 
     me.textbox = 'closed'
    end if
    Are there any arguments for using table(s) to store these? I'd assume the additional Joins would be more overhead, and slower then the client side code to get the text value.

    Code:
    Tblist1
    id  value
    01 Open
    02 CLosed
    Code:
    Select M.name, L.value from mainTbl
    left join Tblist1 L on M.ID = L.id

    There are several other similiar data points like this.


    Working 1st time with a remote DB, so of course speed is concern. Using both Local tables and remote i hear will cause odbc to slow JOINS.


    thanks!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Only advantage for table would be if you want flexibility in adding value options, such as "Pending". If there can never be more than 2, then I would not bother with lookup table.

    The VBA will not work nice with form in continuous or datasheet view. Programmatically setting value of unbound textbox will show the same value on all records. Use expression in textbox ControlSource so result will be dynamic for each record.

    I would use a multi-column combobox (with Value List) instead of a textbox so there is one control for data entry/edit and display.

    In either case, no VBA needed.
    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. Help with bundled item inventory lists
    By fiesta in forum Access
    Replies: 4
    Last Post: 11-13-2018, 01:22 PM
  2. numeric data type and Boolean values
    By rdougherty in forum Access
    Replies: 5
    Last Post: 04-06-2018, 02:23 PM
  3. Replies: 5
    Last Post: 10-30-2013, 07:35 PM
  4. Combining two boolean values
    By John_B in forum Access
    Replies: 6
    Last Post: 02-11-2012, 11:45 AM
  5. How to query boolean values from table
    By kevdmiller in forum Queries
    Replies: 2
    Last Post: 11-30-2006, 07:41 PM

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