Microsoft Access Forums

Go Back   Microsoft Access Forums > Access Forums > Forms

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 06-23-2009, 11:22 AM
AndyKim AndyKim is offline Windows 98/ME Access 2003 (version 11.0)
Novice
 
Join Date: Jun 2009
Posts: 12
AndyKim is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 06-23-2009, 12:04 PM
RuralGuy's Avatar
RuralGuy RuralGuy is online now Windows 7 Access 2007 (version 12.0)
Administrator
 
Join Date: Mar 2007
Location: 8300' in the Colorado Rocky Mountains
Posts: 4,263
RuralGuy will become famous soon enoughRuralGuy will become famous soon enough
Default

The answer is yes but the syntax is different.
http://www.mvps.org/access/forms/frm0031.htm
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07
If your issue is resolved...follow this link for directions on how to use the Solved thread tool!
Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus"
Reply With Quote
  #3  
Old 06-24-2009, 03:41 AM
AndyKim AndyKim is offline Windows 98/ME Access 2003 (version 11.0)
Novice
 
Join Date: Jun 2009
Posts: 12
AndyKim is on a distinguished road
Default 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
Reply With Quote
  #4  
Old 06-24-2009, 05:11 AM
RuralGuy's Avatar
RuralGuy RuralGuy is online now Windows 7 Access 2007 (version 12.0)
Administrator
 
Join Date: Mar 2007
Location: 8300' in the Colorado Rocky Mountains
Posts: 4,263
RuralGuy will become famous soon enoughRuralGuy will become famous soon enough
Default

Maybe Me![Form - Child].Form.Repaint will do it.
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07
If your issue is resolved...follow this link for directions on how to use the Solved thread tool!
Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus"
Reply With Quote
  #5  
Old 06-24-2009, 05:56 AM
AndyKim AndyKim is offline Windows 98/ME Access 2003 (version 11.0)
Novice
 
Join Date: Jun 2009
Posts: 12
AndyKim is on a distinguished road
Default

I tried the repaint. still not working.
Reply With Quote
  #6  
Old 06-24-2009, 07:07 AM
RuralGuy's Avatar
RuralGuy RuralGuy is online now Windows 7 Access 2007 (version 12.0)
Administrator
 
Join Date: Mar 2007
Location: 8300' in the Colorado Rocky Mountains
Posts: 4,263
RuralGuy will become famous soon enoughRuralGuy will become famous soon enough
Default

How about posting a sample db so we can play with it?
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07
If your issue is resolved...follow this link for directions on how to use the Solved thread tool!
Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus"
Reply With Quote
  #7  
Old 06-24-2009, 07:46 AM
AndyKim AndyKim is offline Windows 98/ME Access 2003 (version 11.0)
Novice
 
Join Date: Jun 2009
Posts: 12
AndyKim is on a distinguished road
Default sample db attached

Please see attached sample db. thanks.
Attached Files
File Type: mdb Sample - Color in subform.mdb (172.0 KB, 28 views)
Reply With Quote
  #8  
Old 06-24-2009, 08:10 AM
RuralGuy's Avatar
RuralGuy RuralGuy is online now Windows 7 Access 2007 (version 12.0)
Administrator
 
Join Date: Mar 2007
Location: 8300' in the Colorado Rocky Mountains
Posts: 4,263
RuralGuy will become famous soon enoughRuralGuy will become famous soon enough
Default

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.
Attached Files
File Type: zip SampleColor.zip (17.8 KB, 31 views)
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07
If your issue is resolved...follow this link for directions on how to use the Solved thread tool!
Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus"
Reply With Quote
  #9  
Old 06-24-2009, 02:12 PM
AndyKim AndyKim is offline Windows 98/ME Access 2003 (version 11.0)
Novice
 
Join Date: Jun 2009
Posts: 12
AndyKim is on a distinguished road
Default

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.
Reply With Quote
  #10  
Old 06-24-2009, 02:34 PM
RuralGuy's Avatar
RuralGuy RuralGuy is online now Windows 7 Access 2007 (version 12.0)
Administrator
 
Join Date: Mar 2007
Location: 8300' in the Colorado Rocky Mountains
Posts: 4,263
RuralGuy will become famous soon enoughRuralGuy will become famous soon enough
Default

Glad I could help.
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07
If your issue is resolved...follow this link for directions on how to use the Solved thread tool!
Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus"
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I change the color of a text label with a mouse movement? Deanamay Access 1 03-29-2009 06:27 AM
Change Color of a Command Button when Receives Focus? skyrise Forms 2 03-10-2009 03:14 PM
change cell color bishop743 Programming 0 02-01-2009 08:00 AM
Changing font color based on criteria Pattie Weaver Reports 3 03-27-2006 12:25 PM
font of word bookmarks emilylu3 Programming 1 03-09-2006 09:07 AM


All times are GMT -8. The time now is 02:55 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.