text box code

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
 
S

SuzyQ

select the field in design view, then on the menu Format->conditional
formatting then enter your criteria.
 
N

Nick T

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
 
S

SuzyQ

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
 

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