text box code

  • Thread starter Thread starter Nick T
  • Start date Start date
N

Nick T

Hi,
I have a form which displays data from a query. The form is a 'continous
form' so displays lots of different records.
I have a text box, which on the form which displays a number eg. 2.55 or 3.48

I want to add some code (or somthing) somwhere so that if the number in the
text box is greater than eg. "3" then the text box 'back colour' will go
'vbred'.

Any suggestions??

Many Thanks
 
select the field in design view, then on the menu Format->conditional
formatting then enter your criteria.
 
Hiya,
Thanks for that.
......is there any way i can put this code behind a cmd button & have another
text box that i type my target value into. Then, if my form data is greater
than the number in my 'target' text box, backcolour = vrred.
My cmd button & target text box are placed in the forms header as to not be
replicated on the 'continous form'.

Many thanks
 
you might try putting a text box in the header for your target. Setting up
the conditional formatting as stated below, but use the [target] as your
criteria, then behind the command button's click event put this code

DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70

to refresh the data Access 2000 - I don't know if it will work, but you can
try
 
Back
Top