Color coding text boxes with VB...Please Help!!

M

marcusahle

Hello,

Right now, I have a form with a subform. In the table that the
subform uses is a field called trDueDate and trDateCompleted. The
subforms has a text box that shows trDueDate and color codes it based
on some criteria. If trDateCompleted has a date in it, then I want it
green. If trDateCompleted is empty and the due date is past todays
date, then I want it Red, other wise I want the textbox to be
yellow. Now I got this to work when there is only one record, which
is on a different form/subform. Im not sure how to do this when
there is multiple records. PHP has a fetch_array function which would
work nicely but I do not believe VB has this. Any help would be
greatly appreciated. Thanks in advance!
 
R

RoyVidar

marcusahle said:
Hello,

Right now, I have a form with a subform. In the table that the
subform uses is a field called trDueDate and trDateCompleted. The
subforms has a text box that shows trDueDate and color codes it based
on some criteria. If trDateCompleted has a date in it, then I want
it green. If trDateCompleted is empty and the due date is past
todays date, then I want it Red, other wise I want the textbox to be
yellow. Now I got this to work when there is only one record, which
is on a different form/subform. Im not sure how to do this when
there is multiple records. PHP has a fetch_array function which
would work nicely but I do not believe VB has this. Any help would
be greatly appreciated. Thanks in advance!

In stead of code, check out the conditional formatting on the format
menu - for the condition looking at other controls, you'd be needing
to select "Expression is" in the first dropdown. Also, control/field
names will need to be surrounded in [brackets], I think.
 

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