data based on color

jonamua1971

Registered User.
Local time
Today, 05:55
Joined
Mar 3, 2007
Messages
97
Hi all,
i have this code on this forum it works on a single form but wont work on continous form. PLease help
Code:
Private Sub Form_Current()
If Me.Payee = "Jona" Then
Me.Payee.BackColor = vbBlue
Else
Me.Payee.BackColor = vbRed
Me.Payee.BackColor = vbRed
End If
 
Hi all,
i have this code on this forum it works on a single form but wont work on continous form. PLease help
Code:
Private Sub Form_Current()
If Me.Payee = "Jona" Then
Me.Payee.BackColor = vbBlue
Else
Me.Payee.BackColor = vbRed
Me.Payee.BackColor = vbRed
End If

Hey Jona,

You will need to use conditional formatting to accomplish what you want on a continuous form. You can do a search on conditional formatting and I'm sure you will find plenty to reference. It's a fairly common question.

HTH,
Shane
 
As Shane said, you have to use Conditional Formatting from the menu's Format dropdown for Continuous or Datasheet forms.

In Design View, select the field.

Goto Format-Conditional Format

Using the boxes, select

Field Vale Is Equal To "Jona"

Set the BackColor to Blue

Click on Add

Now select

Field Vale Is Not Equal To "Jona"

Set the BackColor to Red

Click OK.

You should now be set!
 

Users who are viewing this thread

Back
Top Bottom