Apply an "Event Procedure" to each record on a form individually?

  • Thread starter Thread starter Tony Heath
  • Start date Start date
T

Tony Heath

I am trying to Apply an "Event Procedure" to each record
on a form individually, but every time I do I get the same
response - an overall change to all of the records instead
of an idividual change to each record on the form? Can
anyone help me with this? I have tried several solutions
with no lucky?
 
Please explain what you are trying to do and how you have tried so far.


I am trying to Apply an "Event Procedure" to each record
on a form individually, but every time I do I get the same
response - an overall change to all of the records instead
of an idividual change to each record on the form? Can
anyone help me with this? I have tried several solutions
with no lucky?
 
I am trying to change the color of a text box background
in relation to the number in the text box. So let's say
the number in the text box is =>0 I want the background
color of the text box to be red, or if the text box is <0
then I want the text box to be yellow. Here is what I have
tried so far:
Private Sub Form_Open(Cancel As Integer)
If Me!Text5 =>0 Then
Text5.BackColor = QBColor(12)
Else
Text5.BackColor = QBColor(14)
End If
End Sub

This actually works, but it changes all of the text box
backgrounds on all of my records - what I am trying to do
is get the background of each record text boxes to change
individually and to be different colors based on the text
box number? Do you have any suggestions? I know there is a
way, but I tried just about everything I could find under
help and I have had no luck? There has to be a way to run
the Event Procedure on each record individually?
 
It sounds as if you are using a form in Continuous view. If you are using
Access 2000 or newer, right click the textbox and choose Conditional
Formatting.
 
Back
Top