Subform to mimick a list box

H

Hindsey

I am using Access 2003, and I need to conditionally format a list box. I know
I cannot do that, so I've created a subform to make look like a list box and
have applied conditional formatting to it.

I have a checkbox in the subform so that when you click in any of the 3
fields in the subform/list, it will change that checkbox and then apply
conditional formatting to all the fields (the conditional format is
contingent upon that checkbox being checked or not). The conditional format
just makes it "highlight" each field by changing the back and foreground
colors.

The problem I am having is that since I don't want any of the fields to be
editable, to the point where I don't even want the text to be selected (stops
looking like a list box when I do), I had to make each of the fields
Disabled. But when I do that, it won't execute the "on click" code for each
of the 3 fields.

Has anyone had any good luck with this and would know how to guide me in the
right direction?
 
L

Larry Daugherty

Before you attempt to change the textbox, set Enabled=True, make your
changes and set Enabled = False. Do that for each control that you
want to change while protecting it from change at all other times.
You might also want to set me.Paining off before you start and turn it
back on at the end to prevent any flashes or blinks.

HTH
 
H

Hindsey

I don't want to change anything in the subform. I use it to change the record
displayed on main form. My goal is to select the record in the subform, and
have that same record brought up in detail on the main form. At the same
time, I want to have highlighted the selected record in the subform to know
which one I'm on. It works, but I have to have a field enabled on the subform
to be able to use the OnClick code. When I have a field enabled, the subform
loses the List Box field...

Perhaps I am being too vague?
 

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