Combo box problem

K

Kevin

Hi All

I have a very intertesting problem, but is very hard to
explain, so I'm gonna try my best.

I have a subform and in that subform I have multiple
combo boxes. There is one in

particular that is giving me a problem.

This is the scenario. I have a combo box that holds a
value for a classification, and

another that holds the value for a process. There are
only certain processes that belong to

certain classifications. So ultimately what I want is to
pick a classification, then, when I

pick a process it must only show the relevant processes
for that classifiaction. I have

managed to do this, BUT, this is where my problem comes
in. When I insert multiple records

with diffrering classifications and processes, and I exit
the form and load it back up again

this is what happens:

Classification Process
Engineering Dig foundation
Engineering Lay concrete
Electrical
Electrical
Engineering Plaster walls


Notice that there is no values for the electrical
classification, but I did enter them in

when I was entering the data, If I just click in the
process for the electrical

classifications, then the data shows, but only when I
click in the combo box, it doesn't

automatically show the data when the form loads, or even
when i move records. Please could

someone help me out here and explain why this happens, It
is driving me mad, I have tried

all sorts of me.repaint, me.requery, me.refresh etc, but
none of that seems to help at all!

is this some sort of bug in Access? How do I get it to
display all the data in my process

combo box? Please help, this is such an urgent problem
that I need to have solved.

Thanks alot for any help, I hope I was clear enough in my
explanations

Thanks
Kevin
 
R

Rick Brandt

Kevin said:
This is the scenario. I have a combo box that holds a
value for a classification, and another that holds the
value for a process. There are only certain processes
that belong to certain classifications. So ultimately what
I want is to pick a classification, then, when I
pick a process it must only show the relevant processes
for that classifiaction.
I have managed to do this, BUT, this is where my problem
comes in. When I insert multiple records with diffrering
classifications and processes, and I exit the form and
load it back up again

this is what happens:

Classification Process
Engineering Dig foundation
Engineering Lay concrete
Electrical
Electrical
Engineering Plaster walls

You are experiencing normal behavior when your form has three things all being
true.

1) You are changing the RowSource of a ComboBox based on another value in the
record.

2) You are using a continuous form (or Datasheet)

3) Your ComboBox saves one value while displaying another.

The last is the critical one. When you save one value, but display another,
then the value displayed is pulled from the RowSource query, not from the
record. If the Control is bound to a column having the value (1) which
corresponds to the display value "SomeText" then you can only see "SomeText" if
the current RowSource of the ComboBox includes that row value.

When you change a property of a control on a continuous form you are applying
that change to all instances of the control that you see. There is in fact only
one ComboBox so if the RowSource is changed when you navigate to a particular
record then that becomes the RowSource for ALL of the visible ComboBoxes. If
that change to the RowSource causes "SomeText" to be filtered out, then all
records that would normally display "SomeText" have no place to get that value
for display any longer. So you see a blank.
 

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

Similar Threads

Combo box 0
Problems with office 2016 installation. 0
Combo or list box 0
Access 2007 database 2
Check Box On Condition 1
Range relationships 6
How to update the data of a combo box 1
Combo Box Help 7

Top