Results 1 to 4 of 4
  1. #1
    Vita's Avatar
    Vita is offline Competent Performer
    Windows 10 Access 2002
    Join Date
    May 2022
    Location
    Massachusetts, USA
    Posts
    296

    Is there a way to change the @;[Text] Color to a custom color?


    I am using '@;"Order Number"' in the format field of a textbox to have some ghost text.
    I noticed you can use [Color] to change the color but for whatever reason MS didn't deem it important enough to add gray. I feel like ghost text is normally gray haha.
    I tried assigning the forecolor RGB but it doesn't seem to have any effect. Is there anyway to change the color to like a hex code or rgb value?

  2. #2
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Lookup the .ForeColor property:
    https://learn.microsoft.com/en-us/of...tbox.forecolor
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    Vita's Avatar
    Vita is offline Competent Performer
    Windows 10 Access 2002
    Join Date
    May 2022
    Location
    Massachusetts, USA
    Posts
    296
    Oh, Huh. It did work I just had it in the wrong event. My brain is not​ working today.

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    The way I do this is to set the default forecolor to grey and then format as black when text is entered

    The format property could be: [Black]@;"Order Number"
    The user prompt text will look similar to this: Order Number but the text entered by the user will be black

    See
    Add Query Colour (isladogs.co.uk)
    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: 3
    Last Post: 07-01-2020, 03:29 AM
  2. Change Text color and/or background color
    By Thompyt in forum Reports
    Replies: 2
    Last Post: 02-23-2017, 07:08 PM
  3. change tab color or header color
    By witz07 in forum Access
    Replies: 6
    Last Post: 03-31-2016, 05:31 PM
  4. Custom Text Color by Year?
    By YellowRose in forum Forms
    Replies: 1
    Last Post: 02-17-2014, 02:44 PM
  5. Text box change color
    By Ray67 in forum Forms
    Replies: 14
    Last Post: 11-19-2012, 04:06 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