Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003

    Unanswered: combo box on continuous form


    I use Access2K. I would like to create a combo box on continuous form. Lists in this combo box on each record may contain different value. Is this possible ?


  2. #2
    Join Date
    Sep 2003
    A combo box can only have one row source and one row source type at a given time. A 'given time' can correspond to events. Try using the OnCurrent event of a record in your form to reset the row source for the combo box. You will need to determine what criteria exists on the current record to use in creating the row source.

    Strictly speaking, all the combo boxes on your continuous form will have the same row source, but it will appear to the user that they have different ones.

    If the user is entering new records, you will need to use something else to create your initial 'given time' as there will be nothing on the current record to change the list.

    As an example, if your combo box will contain models of cars, you would need the user to pick a manufacterer first. On the AfterUpdate event of that combo box, you change the model combo box's row source; Ford -> Mustang, Thunderbird, or Honda -> Accord, S2000.

    You will also need to test if something already exists in the manufacturer combo box when your user navigates records (OnCurrent) or you could end up with the Ford -> Accord choice.
    All code ADO/ADOX unless otherwise specified.

  3. #3
    Join Date
    Oct 2003


    Here's the designer's conundrum: if the form is continuous, with an unpredictable number of records displayed, and each combo-box displays a separate record, then exactly when should the query be run that populates the content of the drop-down list?

    When a form is single-record, each control on the form is re-queried when you arrive at a new record.
    ChimneySweep(R): fast, automatic
    table repair at a click of the

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts