Results 1 to 10 of 10
  1. #1
    AndyKim is offline Novice
    Windows 98/ME Access 2003
    Join Date
    Jun 2009
    Posts
    12

    Color/font change in subform

    Is it possible to change forecolor or backcolor of a field on a subform? Changing them in a form was no problem. Here is teh code I used.

    Select Case Me.txtColorCntl.Value
    Case 1
    Me.[Form - Child].Form.Points.BackColor = 65535
    Me.[Form - Child].Form.Points.FontSize = 14
    Me.txtColorCntl.BackColor = 65535
    Me.txtColorCntl.FontSize = 14
    Case 2
    Case 3


    Case 4
    End Select
    Me.[Form - Child].Requery

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The answer is yes but the syntax is different.
    http://www.mvps.org/access/forms/frm0031.htm

  3. #3
    AndyKim is offline Novice
    Windows 98/ME Access 2003
    Join Date
    Jun 2009
    Posts
    12

    backcolor and fontsize property still not working

    Hello,

    Thanks for the syntax. When I tried the following, Locked property works, but backcolor and fontsize don't work. Values of the properties are changed, but no affect to the form.

    Select Case Me.txtColorCntl.Value
    Case 1
    Me![Form - Child].Form!Points.Locked = True
    Me![Form - Child].Form!Points.BackColor = 65535
    Me![Form - Child].Form!Points.FontSize = 14
    Case 2
    Case 3
    Case 4
    End Select

    Me.[Form - Child].Requery

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Maybe Me![Form - Child].Form.Repaint will do it.

  5. #5
    AndyKim is offline Novice
    Windows 98/ME Access 2003
    Join Date
    Jun 2009
    Posts
    12
    I tried the repaint. still not working.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How about posting a sample db so we can play with it?

  7. #7
    AndyKim is offline Novice
    Windows 98/ME Access 2003
    Join Date
    Jun 2009
    Posts
    12

    sample db attached

    Please see attached sample db. thanks.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You are probably dealing with a limitation of the Datasheet view which I do not use. Here it is in Continuous Form mode. Try 1 and 2 as Color Codes.

  9. #9
    AndyKim is offline Novice
    Windows 98/ME Access 2003
    Join Date
    Jun 2009
    Posts
    12
    Hello,
    You are right that there is a limitation. I tried it with a continous form and it works. I will mark this thread as solved.

    Thanks again for your help.

    Andy.

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad I could help.

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

Similar Threads

  1. Changing font color based on criteria
    By Pattie Weaver in forum Reports
    Replies: 5
    Last Post: 11-02-2010, 03:38 PM
  2. Replies: 1
    Last Post: 03-29-2009, 08:27 AM
  3. Replies: 2
    Last Post: 03-10-2009, 05:14 PM
  4. change cell color
    By bishop743 in forum Programming
    Replies: 0
    Last Post: 02-01-2009, 11:00 AM
  5. font of word bookmarks
    By emilylu3 in forum Programming
    Replies: 1
    Last Post: 03-09-2006, 12:07 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