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

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?
 
R

Rick B

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?
 
T

Tony Heath

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?
 
W

Wayne Morgan

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.
 

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