Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set field properties based on different field in form 1

Status
Not open for further replies.

deduct

Programmer
Jul 5, 2002
78
US
I have a subform where I am displaying records as a continuous form in a detail section.

I'd like to make one field a different color depending on the contents of another field in the same record.

If fld_a = "A" then I'd like fld_b to be red font color. If fld_a is any other value, I'd like fld_b to be black.

On what event and in which form section do I trap this?

Karl
 
I would use Conditional Formating for those fields. I have tried in the past to use the on current and other events, but that only works for one row at a time, but changes the look of all of the rows. I just did a quick test using the conditional formatind, and that appeared to work.

HTH
Matthew
 
you can't do this using code, basically a continuous form only has 1 set of controls, therefore any change to any "row" in the form will be made on all rows...

if you want to do this, then you will have to use conditional formatting

--------------------
Procrastinate Now!
 
I used conditional formatting and it worked fine.

I used EXPRESSION IS [fld_b]="A", then set the color I wanted.

Thanks for pointing me in the right direction.

Karl
 
Just in case anybody is reading this... I actually used

[fld_a]="A"

on the "extresion is" conditional formatting of fld_b.

Karl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top