comboboxes on subform

  • Thread starter Thread starter papa jonah
  • Start date Start date
P

papa jonah

I have a subform with two comboboxes. The contents of the second is
determined by what is selected in the first. I finally have this
working. The control sources for each combobox are in the same table
and the data is properly being captured in the table.

The problem is that when I scroll from one record in the primary form
to the next, the second combobox in the subform appears empty when a
value had been selected.
For example, I select fish in the first combobox, and goldfish in the
second combobox in the subform and then go to the next record (of the
main form) and select dog then husky in the two comboboxes. I then go
back to the previous record. The first combobox still displays fish,
but the second is blank. However the data is still in the underlying
table.
Is there some sort of event that I can do to tell it to display the
current values in the control source?

TIA
 
I had this same problem about a year ago.. I REALLY try not to be a hack, BUT
the best I could do was to put a text box linked to the same datasource over
the combo box (but not the arrow on the combo box). Don't let them type
directly into the text box... You're basically making it look like a combo
box.

I know, it's very far from ideal, but I worked on it for a few days and got
input from co-workers.. it was the best we could do.


*** this would be easy in VB..
 
That is an interesting idea. Would the background of the text box be
turned off or something so that when the dropdown is first selected it
can be seen?
Or does the text box just display would was just selected?
 
One way I do (which also overcome the problem with cacaded ComboBoxes in
CtsFormView) is to use 2 ComboBoxes on top of each in place of your second
ComboBox (i.e. totalling 3 ComboBoxes): 1 ComboBox is unfiltered and the
second one filtered. The unfiltered one sit on top and on its GotFocus
Event, re-query the filtered ComboBox and send the Focus to the filtered
ComboBox.
 
Back
Top