Results 1 to 5 of 5
  1. #1
    taholmes160 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2018
    Location
    Lester, Ohio
    Posts
    67

    Reading values from a "settings" table for things like form colors and titles

    HI All:



    Is it possible to take values from a table and put them in the properties fields of various forms etc?

    My idea is to have a table where thinks like name of company and colors for form backgrounds etc are stored and have them be used on many forms throughout a database. Im pretty sure things like the name of the company can be used -- that shouldnt be too hard, but im more wondering about values to go into properties settings to allow the user to customize the db to their desires

    can anyone point me in the right direction?

    thanks
    TIM

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Settings tables are very commonly used in Access.
    If you only want to store a few values, create a single row table with a field for each.
    However if there will be a lot of values, use a settings table with three fields:
    SID - PK AUTONUMBER
    SName text
    SValue Text

    In either case, I would then use functions such as GetConpanyName to recall the values when needed...or use Tempvars

    However, unless you are intending that clients choose their own form colours, I would just set these in the form design
    Last edited by isladogs; 01-05-2019 at 08:57 AM. Reason: Typo
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,412
    Here's a tool to easily set the colors for all your forms in a consistent fashion. Not for the user, but for the developer.
    https://www.accessforums.net/showthread.php?t=58464

    Be sure to scroll down to get latest version.
    Last edited by davegri; 01-05-2019 at 08:40 AM. Reason: add scroll

  4. #4
    taholmes160 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2018
    Location
    Lester, Ohio
    Posts
    67
    Ideally I would like for the customer to be able to change their own theme colors

    TIM

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Dave's excellent example may well do exactly what you want


    Otherwise my colour converter utility may be helpful http://www.mendipdatasystems.co.uk/c...ter/4594450413
    Then store the RGB or OLE values in a table and add code to each form to retrieve those values.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Replies: 14
    Last Post: 08-29-2019, 04:52 PM
  2. Replies: 7
    Last Post: 08-07-2017, 03:22 PM
  3. Replies: 4
    Last Post: 08-19-2016, 12:11 AM
  4. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  5. Access Reading File Path Incorrectly "..\.."
    By tdoolittle in forum Programming
    Replies: 5
    Last Post: 10-01-2014, 02:53 PM

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