Combo Box problem

  • Thread starter Thread starter Nancy
  • Start date Start date
N

Nancy

Please read and help if it's possible.

I have a database with an Order Form containing a SubForm
for items and several Sub-SubForms (ssf) with item
description choices. The relationships of these forms is
One to Many to One. There are no record selectors on the
ssf's, because there will be only one group of
descriptors chosen for each SubForm item.

The Sub-SubForms contain several combo boxes each from
which to select descriptive information, and an
autonumber as the ssfkey. Once descriptive items have
been chosen, the ssfkey is fed to a matching field on the
Parent form (Master/Child relationship). Each combo box
gets its list from a query and feeds a textbox on the ssf
with the description's key (bound column 1). Each ssf
also builds a record in a matching table of the ssfkey
and each descriptor. All of this is working well.

Here is my problem. Since I will only chose one
description group for each subform, is there a way to
have the combo boxes continue displaying the selection,
even if I move to the next record on the item list (sub-
form) and then return to the first record? As it happens,
the combos all appear blank when I return, as though I
hadn't made any choices.

Please, please, please!!! If anyone can help me with this
problem, I would so appreciate it. I've tried all of my
books and the knowledgebase, looking for the answer
without any luck.

THANKS in advance, even if your response is that this is
impossible. It would be preferrable to seeing a blank in
front of my message, as though no one had read my
question.
 
Nancy said:
I have a database with an Order Form containing a SubForm
for items and several Sub-SubForms (ssf) with item
description choices. The relationships of these forms is
One to Many to One. There are no record selectors on the
ssf's, because there will be only one group of
descriptors chosen for each SubForm item.

The Sub-SubForms contain several combo boxes each from
which to select descriptive information, and an
autonumber as the ssfkey. Once descriptive items have
been chosen, the ssfkey is fed to a matching field on the
Parent form (Master/Child relationship). Each combo box
gets its list from a query and feeds a textbox on the ssf
with the description's key (bound column 1). Each ssf
also builds a record in a matching table of the ssfkey
and each descriptor. All of this is working well.

Here is my problem. Since I will only chose one
description group for each subform, is there a way to
have the combo boxes continue displaying the selection,
even if I move to the next record on the item list (sub-
form) and then return to the first record? As it happens,
the combos all appear blank when I return, as though I
hadn't made any choices.


This happens because the combo box's RowSource query is
filtered to a list that does not inlude the value in the
combo's bound **field**. You didn't explain how you are
filtering the combo's data list, but it's not uncommon to
restrict the list to just the items that are in a category
selected somewhere else on the form/subform.

The usual workaround is to set the subform's RecordSource
query to join to the combo's RowSource table (on the item
code field) and include the descriptive text as a field for
the form to display. If you place a text box bound to the
descriptive field exactly on top of the combo box's text
portion (leaving the little down arrow to show), then the
text box will display the desired text. To prevent a user
from editing this value directly, add code to the text box's
GotFocus event to immediately reset the focus to the combo
box. As soon as the combo box recieves the focus it wiil be
brought to the front and operate as if the text box were not
there.
 
Back
Top