Which On Event to run code against each row of the result of a query?

HairyArse

Registered User.
Local time
Today, 08:04
Joined
Mar 31, 2005
Messages
92
Hello, I have a subform that among various other fields displays the date an item was due to be delivered. I've written some straight forward code that changes the entire line of text to red if the item is late, or green if it's not yet late. The problem is, no matter which On Event I seem to apply it to, it applies it to every single line based on the results of the first row.

Which On Event should I use such that the code is run separately for each row of the query's result?

Thanks
 
I assume this is on a continious form, if so this is normal. You can use conditional formatting, but this is limited to 3 conditions in early access.

JR
 
Yeah this is on a continuous form.

I've just noticed the conditional formatting options and while this sort of does what I want it to, I don't have enough control over, i.e. I can't define a specific colour other than what's available in the pre-select list.

Is there way to run code against every item in the result of a query as I can see myself needing to do this again and often.
 
To my knowlage, no. The problem lies in the consept of Current record it is only current when it has focus, so in a single view it appers to "work" because you only see 1 record at the time and thous fire the OnCurrent event when you change record.

Sorry, the good news is that in access 2007/2010 you have better control over conditional formatting

JR
 

Users who are viewing this thread

Back
Top Bottom