conditional formating

T

tom t

is there a way for the value on the conditional
formating properties on a field to do a dlookup for that
value ?
 
T

tom t

I need some help with some VB code or an expression
I have a (Dlookup) bound field that I will put a value in
like 50. On another form I would like for a field to look
at that dlookup value and if the value in less than 50 it
will do nothing but if the value is >50 I need
conditional
formatting to make the value turn red or flash or do
something to gain someone's attention .
This is for a maintenance schedule on an aircraft that
will remind the tech when it is time for a 50 hour
inspection
Thanks
 
S

Stephen Lebans

I still do not understand your setup. Is the field you describe as
containing the value "like 50" part of the recordset bound to the form
where you want to apply CF? Or is it on a seperate form that will always
be open when you app is running?
I'll guess the field is not part of the recordset of the form containing
the control you want to apply CF to. In that case you can have a
function evaluated by CF by placing the function's name in the CF's
"Expression is" TextBox control.

OFTOMH:(See my Web site for CF code samples)
For Example, Open the CF GUI:
Condition1
Expression is fSomething()
And then setup the control's exposed CF available props in the desired
manner.

Write a seperate Function in a standard Code module. Something like:

Public Function fSomething() as Boolean
If Forms!THeOpenFormsName.NameOfTextBoxControlContaingDesiredValue.Value
fSomething = TRUE
Else
fSomething = FALSE
End if

End Function

So you can see if the function returns TRUE then CF is applied else if
the function returns FALSE then CF is not applied to this row.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

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