By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,213 Members | 1,342 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,213 IT Pros & Developers. It's quick & easy.

Listbox problem, XP, Access2007

P: 12
Ok,

First, thanks in advance.

Scenario:
1 - Form
1 - listbox with 5 rows, 5 columns
5 - Rectangles (corresponds to LB rows)

Problem:
I want rectangle2 to have two states (backcolor=green, backcolor=red)
If data in ListBox(row1, column4) = true then I want backcolor=green
Else I want backcolor=red.
Jan 29 '08 #1
Share this Question
Share on Google+
1 Reply


MindBender77
100+
P: 234
Ok,

First, thanks in advance.

Scenario:
1 - Form
1 - listbox with 5 rows, 5 columns
5 - Rectangles (corresponds to LB rows)

Problem:
I want rectangle2 to have two states (backcolor=green, backcolor=red)
If data in ListBox(row1, column4) = true then I want backcolor=green
Else I want backcolor=red.
Try:
Expand|Select|Wrap|Line Numbers
  1. If IsNull(Listbox.Column(4, 1)) = True Then
  2. Box1.BackColor = RGB(255, 0, 0) 'This is Red
  3.  
  4. ElseIf IsNull(Listbox.Column(4, 1)) = False Then
  5. Box1.BackColor = RGB(0, 255, 0) 'This is Green
  6. End If
  7.  
Hope this Helps,
JS
Jan 29 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.