By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,317 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,317 IT Pros & Developers. It's quick & easy.

Change forecolor of field in subform Access 2007

P: n/a
TD
I am trying to change the forecolor of a field in a subform that is in
datasheet view. I am using Access 2007. I have tried everything I
can think of to do this but the text still appears in black. I need
it to appear in red if the field has the word "YES" in it. Is there
something in Access 2007 that keeps this from working?????

Feb 20 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Access does not have the capability to change colors of fonts/cells in a
datasheet view -- natively.

One fix that comes to mind would be to create a com User control in
VB2005 using a datagridview control (the .Net equivalent of an Access
subform) which has mega versitility and then implement that in Access.
The only caveat here would be that whoever used the control would need
to be running the .Net 2.0 framework on the respective workstation(s)

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Feb 20 '08 #2

P: n/a
TD
On Feb 20, 2:56*pm, Rich P <rpng...@aol.comwrote:
Access does not have the capability to change colors of fonts/cells in a
datasheet view -- natively. *

One fix that comes to mind would be to create a com User control in
VB2005 using a datagridview control (the .Net equivalent of an Access
subform) which has mega versitility and then implement that in Access.
The only caveat here would be that whoever used the control would need
to be running the .Net 2.0 framework on the respective workstation(s)

Rich

*** Sent via Developersdexhttp://www.developersdex.com***
Thanks for the help!
Feb 20 '08 #3

P: n/a
On Feb 20, 12:37*pm, TD <d...@adsi-sc.comwrote:
I am trying to change the forecolor of a field in a subform that is in
datasheet view. *I am using Access 2007. *I have tried everything I
can think of to do this but the text still appears in black. *I need
it to appear in red if the field has the word "YES" in it. *Is there
something in Access 2007 that keeps this from working?????
Well, you can try this way on your form
you need to create two unbound textboxes

in the controlsource of the first one
=IIf([yourYesNofield]="yes",[yourYesNofield],"")
define the forecolor of this one as red(or whatever color you want)

in the controlsource of the second one
=IIf([yourYesNofield]="no",[yourYesNofield],"")
define the forecolor of this one as black(or whatever color you want)

be sure you have the real [yourYesNofield] field in place but set its
visible property to false.

make sure all three boxes are the same size and layer them on top of
each other

change the form property from datasheet to continuous form

hope this helps
bobh.
Feb 20 '08 #4

P: n/a
Simply use Conditional Formatting. Look it up in Access Help.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"TD" <dl**@adsi-sc.comwrote in message
news:d3**********************************@i7g2000p rf.googlegroups.com...
>I am trying to change the forecolor of a field in a subform that is in
datasheet view. I am using Access 2007. I have tried everything I
can think of to do this but the text still appears in black. I need
it to appear in red if the field has the word "YES" in it. Is there
something in Access 2007 that keeps this from working?????

Feb 21 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.