I have spent hours/days going through posts here, and in books and haven't found anything that I see addressing my questions...so 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?
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.
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.