Setting ForeColor

D

DaBartman

I have a form that I have set the Control Source to a table then I put the
required text boxes on the form, each one of which is bound to the field in
the table. The form is set to display continuous forms. Works just fine. My
question is can I control the forecolor in these text boxes? One in
particular displays currency data and the forecolor is set to black in the
properties dialog. I would like to be able to change the forecolor to red if
the data in the table is < 0. Can this be done? I haven't been able to think
of anyway to do this as the continuous form display is done in the background
by Access. Any help would be appreciated.
Bart
 
A

Al Camp

DaBartman
If you're using A2000 and up, you could use ConditionalFormatting, but even easier...
Try this Format for your Currency field...

$ #.00[Black];-$ #.00[Red];.00

(Adjust to suit...)
 
F

fredg

I have a form that I have set the Control Source to a table then I put the
required text boxes on the form, each one of which is bound to the field in
the table. The form is set to display continuous forms. Works just fine. My
question is can I control the forecolor in these text boxes? One in
particular displays currency data and the forecolor is set to black in the
properties dialog. I would like to be able to change the forecolor to red if
the data in the table is < 0. Can this be done? I haven't been able to think
of anyway to do this as the continuous form display is done in the background
by Access. Any help would be appreciated.
Bart

Set the Format property of the control to:

#[Black];-#[Red];0[Black]

See Access Help on Format Property + Number and Currency datatypes.

If you have Access 2000 or newer you can also use Conditional
Formatting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top