mario_34
asked on
Setting text color on a subform
Hi,
i have a subform (with it's query) in datasheet mode. This subform displays some numeric and some non-numeric values. How can i set the text color of an entire row to i.e. red if a certain numeric field is negative? I tried with the Format function and with some VBA code (setting the ForeColor property) but with no results. Any suggestions ?
i have a subform (with it's query) in datasheet mode. This subform displays some numeric and some non-numeric values. How can i set the text color of an entire row to i.e. red if a certain numeric field is negative? I tried with the Format function and with some VBA code (setting the ForeColor property) but with no results. Any suggestions ?
Sorry, you CANNOT do what you have asked using a datasheet form.
Check this link for some discussion and solutions for continuous subforms (but not datasheet).
http://www.mvps.org/access/forms/frm0047.htm
Check this link for some discussion and solutions for continuous subforms (but not datasheet).
http://www.mvps.org/access/forms/frm0047.htm
As stated above, marking a whole line can only be achieved in multiple form mode and not in datasheet mode...
If you have A2000 then you can use "Tools/Conditional formatting" on the field itself.
If you set the backgrounds of all other fields to Transparant, you can "expand" the "condition field" to be as wide as the whole line. (Using left/centre/right you can place the field content accordingly)
Now just place the field <0 condition to fill the background of your amount field...
For A97 stick to the above link.
Nic;o)
If you have A2000 then you can use "Tools/Conditional formatting" on the field itself.
If you set the backgrounds of all other fields to Transparant, you can "expand" the "condition field" to be as wide as the whole line. (Using left/centre/right you can place the field content accordingly)
Now just place the field <0 condition to fill the background of your amount field...
For A97 stick to the above link.
Nic;o)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Jim,
the technique you described works only on continuous forms or does it also work in datasheet view ?
the technique you described works only on continuous forms or does it also work in datasheet view ?
Just continuous forms. Not much you can do with a datasheet. Should have made that clearer.
Sorry,
Jim.
Sorry,
Jim.
Check this link for some discussion and solutions for continuous subforms (but not datasheet).
http://www.mvps.org/access/forms/frm0047.htm