Question ListBox row colour change

DanJames

Registered User.
Local time
Today, 05:44
Joined
Sep 3, 2009
Messages
78
I have a listbox (list14) that displays 3 columns.

The row source is SELECT QryPaymentsDue.FullName, QryPaymentsDue.[And], QryPaymentsDue.[Next Payment Due] FROM QryPaymentsDue;

  • I want an if statement to say that if column 3 (Next Payment Due) is <Todays Date then the row colour to flash red.
  • If column 3 is =Today() then the row colour to be green.
  • And if column 3 is after today (a future date) >Todays Date it can be white.
Thanks alot, PS: i do not mind if it cannot flash red but it would be a bonus.

Dan.
 
Not possible with listboxes I'm afraid (as far as I know), how ever you could use a subform instead and use Conditional Formatting on the fields in question.

would have been a cool feature thou...

JR
 
Ahh ok then,

Is it possible to sort the listbox in order of column 3, saying the ones that are <today (past dates) at top, then equal to today() in middle, and then the ones >today() (future dates) at bottom.

That would be good?
 
A listbox is just like a query, you can sort it in any order you want, just remember that the sort order starts with the left most sortcolumn. In the listbox Rowsource just click on the button to the right looks like a button with 3 dots on it, that opens up a querygrid and just set your sortorder.

I belive an asending sortorder on collum 3 will put the oldes dates first.

JR
 

Users who are viewing this thread

Back
Top Bottom