Results 1 to 5 of 5
  1. #1
    twgonder is offline Expert
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658

    Way to set fore and backcolor in form caption?


    I've searched Google and here, I can't find any mention of this.

    I want to set the fore and backcolors of the caption bar (or whatever it's called) on the top of a form.

    This compiles:
    Me.Caption = "Status: Error - " & gError


    This doesn't:
    Me.Caption.BackColor = vbRed

    Compiler error: Invalid qualifier
    Can it be done and what's the syntax?

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    I don't think it can be set.
    I think it picks up the colour from the current windows theme.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,445
    Use a label to look like the windows bar and open the form with no borders or thin borders.

  4. #4
    twgonder is offline Expert
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658
    Quote Originally Posted by CJ_London View Post
    Use a label to look like the windows bar and open the form with no borders or thin borders.
    I've played with turning off the borders, the only problem I've come across is if a form gets stuck or is in a loop, I haven't yet found a way to close it down. I hate to just close the whole Access window. My laptop doesn't support the break-key. Since I've added a close button along with many others for form/record control, the suggestion seems quite viable.

    Have you done this and with any other problems popping up other than the two I mentioned above?

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,445
    Have you done this and with any other problems popping up other than the two I mentioned above?
    yes. and no problems - you can add code to the label (using the mouse events) to move the window around if required. Not sure what you mean by 'getting stuck' but as far as loops are concerned, I suppose could happen in development but should not happen when released to production as the code should have resolved handling of all possible loops.

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

Similar Threads

  1. Fore Name and Or surname
    By DMT Dave in forum Access
    Replies: 6
    Last Post: 07-16-2020, 10:51 AM
  2. Replies: 18
    Last Post: 05-15-2020, 08:59 AM
  3. Replies: 15
    Last Post: 08-02-2018, 07:22 AM
  4. Replies: 15
    Last Post: 11-03-2015, 12:48 AM
  5. Caption for the form or report
    By kpalar in forum Forms
    Replies: 1
    Last Post: 08-01-2014, 07:44 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