Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004

    Unanswered: Listbox on Continuous Subform

    I have spent hours/days going through posts here, and in books and haven't found anything that I see addressing my here they are:

    I have a subform on a form. The subform is based on one table and has a listbox based on another table. I have 2 fields in the subform, and the listbox uses these to look up 4 fields in it's table for display.

    When I edit the subform alone as a form, the listbox works if it's in single mode, but not in continuous mode. Then, when I try to view it as a subform, it doesn't work at all. I guess I just can't figure out how to tell the listbox's query where the txtboxes are. it works with me!txtincidentid when it is just a form. I have tried me!txtincidentid, forms!frmincidents!txtincidentid, forms!subfrmincidents!txtincidentid, and I tried making the value of txtincidentid a global variable and having the query find it there.

    So, here are my questions: 1. how can i make the subform's listbox know where the textboxes are when it is a subform?
    2. if i get this problem solved, will it even work in continuous mode, or is there some other way?

  2. #2
    Join Date
    Feb 2004
    To reference a control in a subform try this


  3. #3
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    Sounds like you have a messy setup to begin with. Regardless, I would place another subform within your current subform and let the parent->child relationship between the two do your filtering for you, then bind the listbox's control source to your new subform's datasource.

  4. #4
    Join Date
    Apr 2004
    Both suggestions kind of worked. As for the naming of the control, that stopped the error messages and showed the headings of the columns, but still no information. As for the second suggestion of creating another subform, that worked but not with the continuous forms.

    As for it being messy, I thought this was the best solution to keep the number of forms to a minimum and also to keep normalization in check. But, perhaps I'm far out enough from my classes to have forgotten exact rules.

    Thanks for the help....any other suggestions, otherwise I'll just redesign the forms.

Posting Permissions

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