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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

conditional formating using formuleas

Status
Not open for further replies.

pronate

Technical User
Jul 7, 2002
64
SG
i want to use conditional formatting, but not constant values to test like....

if great than 3 then...make the text red in colour.. but instead...

if great than [forms]![specs]![max value]....make the text red in colour

Can this be done? i tried but failed. Else, do anyone have any other suggestions? I tried using marcos.....attached to the onchange event of the textbox...but can't find a way to change the text values.....and i suspect that the whole column will be changed to red if i do that, not just individual ones, like when i use conditional formatting.

Cheers
Sam
 
Hi,

I'm assuming that the value to check against is on the current form, and the comparison to check against is on another form (as per your example).

I have a field on form1 with focus called txtCurVal.
I have a field on form1 with focus called txtChangeCol
I have a field on form2 called txtConstVal.

if txtCurVal > forms!form2!txtConstVal then
txtChangeCol.backcolor = 345667 (whatever color constant)
endif

Darrylles "Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top