How can I format on 3 conditions together

  • Thread starter Thread starter Roger Ottaway & Daryll Vaganee
  • Start date Start date
R

Roger Ottaway & Daryll Vaganee

I have a financial summary form with a number of text boxes, each of which
contains financial data. Three of the boxes in the form calculates money
owed to various people. When each of the 3 text boxes has a $0 value, all of
the debts are paid. I have another text box with the text "DOSSIER CLOSED"
in it. The normal lettering is gray against a gray background, so it can't
be seen. I want to use conditional formatting so that when ALL of the three
boxes = 0, the "DOSSIER CLOSED" text box is formatted bold red. I can format
on condition 1 OR condition 2, OR condition 3, but how can I format a
condition based on condition 1 AND condition 2 AND condition 3 ?

Thanks . Roger
 
You can write visual basic code to do this. In the form
properties, under "Event" choose "On Current" and
select "Event Procedure." Use an If statement as follows:

If Me!box1.value = 0 And Me!box2.value = 0 And Me!
box3.value = 0 Then
Me!box4.forecolor = 255
End If

(255 = red) wherever I said "box" you need to put the name
of the text box (which you can find in its properties).
I would make the normal gray formatting bold, since it
doesn't matter since you can't see it, then you don't have
to bold anything in the code.

Good luck!

~ Kathryn
 
Kathryn ... thanks for your help, I followed your instructions and entered
the following ...

Private Sub Form_Current()
If Me!Text16.Value = 0 And Me!Text19.Value = 0 And Me!Text23.Value = 0 Then
Me!Text33.ForeColor = 255
End If
End Sub

But it doesn't work! What is "Me!" ... what have I done wrong ? I am using
Access2000 does that make a difference ?

thanks ... Roger
 
Back
Top