VB Code Help

  • Thread starter Thread starter t-boy
  • Start date Start date
T

t-boy

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
 
-----Original Message-----
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

.

You could put a little code in the "on current" event of
the second form, like this:

If [hours field] > 50 then
[hours field].ForeColor = 255 ' red
Else
[hours field].ForeColor = 0 ' black
Endif
 
Back
Top