Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

comboboxes on subform

Discussion in 'Information Technology' started by papa jonah, Nov 15, 2005.

  1. papa jonah

    papa jonah
    Expand Collapse
    Guest

    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
     
  2. TomHinkle

    TomHinkle
    Expand Collapse
    Guest

    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..

    "papa jonah" wrote:

    > 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
    >
    >
     
  3. papa jonah

    papa jonah
    Expand Collapse
    Guest

    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?
     
  4. Van T. Dinh

    Van T. Dinh
    Expand Collapse
    Guest

    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.

    --
    HTH
    Van T. Dinh
    MVP (Access)




    "papa jonah" <adullam04-excelgoogle@yahoo.com> wrote in message
    news:1132001275.896257.49120@f14g2000cwb.googlegroups.com...
    >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
    >
     

Share This Page