Results 1 to 3 of 3
  1. #1
    TenOc is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Feb 2015
    Posts
    94

    Set Background Color (image) of subform

    While I have used Access for a number of years and have develop a number of applications I have never had to use code. Thus I am VERY new to VBA code. I now have a problem that I think the expression or macro will not solve an I need to do some coding. Please excuse me if I use the wrong words.

    I have a "frm_Main" with 4 tabs subform -- call them "subform1", "subform2", "subform3", "subform4". The main form has a background image --call the image "photo1" which is a JPG file. The sub-forms show up with a white background. The users complain about the white background on the subforms.


    I assume that I should have an event that triggers when the main form is "current". I have tried for 3 days to write code for the "is current event" of the main form to set the background of the 4 subforms to the photo1 without any success. I have seen sample code on the internet help pages, but when I try to use them I always get some syntex or other errors.

    Will someone please give me detail code that I can past into my Access application?

    Thanks.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    white is the best color to see black text data.
    if the images has white background then it will be white. Images are not transparent.
    you can set the background color, behind the image, to any color using form design mode.

    you can also set it in the ON CURRENT event:
    me.Detail.BackColor = vbRed

  3. #3
    TenOc is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Feb 2015
    Posts
    94
    I got it to work by creating a subform and them drag and drop into the correct tab.

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

Similar Threads

  1. Replies: 3
    Last Post: 02-23-2019, 06:10 PM
  2. Replies: 5
    Last Post: 08-25-2018, 04:55 PM
  3. Change Text color and/or background color
    By Thompyt in forum Reports
    Replies: 2
    Last Post: 02-23-2017, 07:08 PM
  4. Background Color
    By Meccer in forum Access
    Replies: 4
    Last Post: 05-30-2011, 06:49 AM
  5. Background color for fields in a subform
    By eric.opperman1@gmail.com in forum Forms
    Replies: 3
    Last Post: 03-19-2011, 07:46 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