Results 1 to 2 of 2
  1. #1
    rtrinidad is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    4

    Change font color in subform

    I have a form which includes a command button (let's call it Main Button) and a subform which has other command buttons (let's call them Sub Buttons). The subform also includes a textbox.

    When I click a Sub Button, the textbox in the subform gets a value and turns red and the Main Button's text turns red. I accomplished this with the code:

    Code:
    Private Sub SubButton_1_Click()
    Me.Textbox = 1
    Me.Textbox.ForeColor = RGB(170, 0, 0)
    Me.Parent.MainButton.Enabled = True
    Me.Parent.MainButton.ForeColor = RGB(170, 0, 0)
    End Sub
    I'm trying to figure out how to get the subform's textbox to change to black when clicking the Main Button in the parent form. I assumed it would be something like:

    Code:
    Private Sub MainButton_Click()
    Me.Judge_1_Subform.Form.AllowAdditions = True
    Me.Judge_1_Subform.Requery
    Me.MainButton.ForeColor = 12632256
    Me.Subform.SubButton.ForeColor = RGB(0,0,0)
    End Sub
    The last line is wrong. I can't seem to point to the textbox in the subform to alter the color. Is it possible? Can anyone help?



    Thanks.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

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

Similar Threads

  1. Change font color in Query
    By Brian62 in forum Queries
    Replies: 2
    Last Post: 01-10-2013, 09:14 PM
  2. Replies: 3
    Last Post: 07-05-2010, 10:46 PM
  3. Change color font when updating data?
    By Mike1379 in forum Reports
    Replies: 3
    Last Post: 05-17-2010, 08:00 AM
  4. Change as per condition font color
    By miziri in forum Programming
    Replies: 1
    Last Post: 08-20-2009, 04:23 AM
  5. Color/font change in subform
    By AndyKim in forum Forms
    Replies: 9
    Last Post: 06-24-2009, 04:34 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