changing forecolor

G

Guest

i have a continous form and i put the ff. code on "on current" event

If Me.combo1.Value = "CASH" Then
Me.textbox1.ForeColor = vbRed
Me.textbox2.ForeColor = vbRed
ElseIf Me.combo1.Value = "CHECK" Then
Me.textbox1.ForeColor = vbBlue
Me.textbox2.ForeColor = vbBlue

the problem is if the first record is set to "CASH" all the said textbox is
color in red
even the second record although it is set to "CHECK". is there a right way
to do this
 
A

Allen Browne

Assuming Access 2000 or later, use Conditional Formatting.

It's on the Format menu, in form design view.
 

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