Conditional formatting with combo box

W

WestWingFan

Hello,

In A07, I have a field in a continuous form that I would like to apply
conditional formatting to based on how the text in the field compares to the
unbound combo box in the header. I can get it to work with Expression is:
[UsedIndustry] Not Like "*Automotive*"

but not when I try to reference the second column of the combo box
[UsedIndustry] Not Like "*me.cboindustryselect.column(1)*"

Any ideas what I'm doing wrong?

Thanks in advance
 
W

WestWingFan

Thanks for the quick response. I hate to say that it does not work. The test
cell does not change appropriately.

What do we try next?

Douglas J. Steele said:
Try

[UsedIndustry] Not Like "*" & me.cboindustryselect.column(1) & "*"


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


WestWingFan said:
Hello,

In A07, I have a field in a continuous form that I would like to apply
conditional formatting to based on how the text in the field compares to
the
unbound combo box in the header. I can get it to work with Expression is:
[UsedIndustry] Not Like "*Automotive*"

but not when I try to reference the second column of the combo box
[UsedIndustry] Not Like "*me.cboindustryselect.column(1)*"

Any ideas what I'm doing wrong?

Thanks in advance
 
D

Douglas J. Steele

You sure it's the second column of the combo box you need to compare? (The
Column collection starts numbering at 0)

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


WestWingFan said:
Thanks for the quick response. I hate to say that it does not work. The
test
cell does not change appropriately.

What do we try next?

Douglas J. Steele said:
Try

[UsedIndustry] Not Like "*" & me.cboindustryselect.column(1) & "*"


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


WestWingFan said:
Hello,

In A07, I have a field in a continuous form that I would like to apply
conditional formatting to based on how the text in the field compares
to
the
unbound combo box in the header. I can get it to work with Expression
is:
[UsedIndustry] Not Like "*Automotive*"

but not when I try to reference the second column of the combo box
[UsedIndustry] Not Like "*me.cboindustryselect.column(1)*"

Any ideas what I'm doing wrong?

Thanks in advance
 
W

WestWingFan

Sorry for the delayed response - a cold kicked in over the weekend.

I just double checked and it is the second column of the combo box.

Douglas J. Steele said:
You sure it's the second column of the combo box you need to compare? (The
Column collection starts numbering at 0)

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


WestWingFan said:
Thanks for the quick response. I hate to say that it does not work. The
test
cell does not change appropriately.

What do we try next?

Douglas J. Steele said:
Try

[UsedIndustry] Not Like "*" & me.cboindustryselect.column(1) & "*"


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Hello,

In A07, I have a field in a continuous form that I would like to apply
conditional formatting to based on how the text in the field compares
to
the
unbound combo box in the header. I can get it to work with Expression
is:
[UsedIndustry] Not Like "*Automotive*"

but not when I try to reference the second column of the combo box
[UsedIndustry] Not Like "*me.cboindustryselect.column(1)*"

Any ideas what I'm doing wrong?

Thanks in advance
 
W

WestWingFan

Could this have something to do with the second column being text? Do I need
to include some combination of " and '?

WestWingFan said:
Sorry for the delayed response - a cold kicked in over the weekend.

I just double checked and it is the second column of the combo box.

Douglas J. Steele said:
You sure it's the second column of the combo box you need to compare? (The
Column collection starts numbering at 0)

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


WestWingFan said:
Thanks for the quick response. I hate to say that it does not work. The
test
cell does not change appropriately.

What do we try next?

:

Try

[UsedIndustry] Not Like "*" & me.cboindustryselect.column(1) & "*"


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Hello,

In A07, I have a field in a continuous form that I would like to apply
conditional formatting to based on how the text in the field compares
to
the
unbound combo box in the header. I can get it to work with Expression
is:
[UsedIndustry] Not Like "*Automotive*"

but not when I try to reference the second column of the combo box
[UsedIndustry] Not Like "*me.cboindustryselect.column(1)*"

Any ideas what I'm doing wrong?

Thanks in advance
 
D

Douglas J. Steele

To be honest, I've never used continuous formatting (in Access 2007 or any
other version), so I'm afraid I'm not sure.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


WestWingFan said:
Could this have something to do with the second column being text? Do I
need
to include some combination of " and '?

WestWingFan said:
Sorry for the delayed response - a cold kicked in over the weekend.

I just double checked and it is the second column of the combo box.

Douglas J. Steele said:
You sure it's the second column of the combo box you need to compare?
(The
Column collection starts numbering at 0)

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Thanks for the quick response. I hate to say that it does not work.
The
test
cell does not change appropriately.

What do we try next?

:

Try

[UsedIndustry] Not Like "*" & me.cboindustryselect.column(1) & "*"


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


message
Hello,

In A07, I have a field in a continuous form that I would like to
apply
conditional formatting to based on how the text in the field
compares
to
the
unbound combo box in the header. I can get it to work with
Expression
is:
[UsedIndustry] Not Like "*Automotive*"

but not when I try to reference the second column of the combo box
[UsedIndustry] Not Like "*me.cboindustryselect.column(1)*"

Any ideas what I'm doing wrong?

Thanks in advance
 

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