Full Version: Continuous subfrm with listbox lists same results for all record
UtterAccess Forums > Microsoft® Access > Access Forms
fredrisg
Checked the archives . . . many danced around this type of issue but not answer that I could find.
I've got a continuous subform that list details for say an office.
With each office, you can have several office managers.
So, I put a listbox on the subfrm that links to a hidden txtbox for the OfficeID such that I have a qry in the listbox that attempts to reqry off the hidden txtOfficeID textbox for each office.
The result, however, is that the listbox just shows the office managers for the first office (top of the continuous form) for every office!
The listbox is unbound . . . and in 'theory' would show the correct office managers on the continuous form for each based on each officeID . . . but it's not happening in that manner.
Is this a limitation of a continuous subfrm?
thanks,
Steve
theDBguy
Hi Steve,
You got it! That is the limitation of a continuous view form. Even though you see multiple instances of an unbound control, Access treats it as if there's only one - the current record.
Obelieve Leigh has some solutions to this issue on his website (don't have it right now).
Hope that helps...
fredrisg
Thanks . . . I was afriad that was the case . . . and that's truly unfortunate!
On any event, I've created a small subfrm to the right of the main subfrm and list the contacts in it using the OnCurrent event of the main subfrm to reqry the contacts subfrm.
Not as 'pretty' but it works . . .
Thanks for the information!
Steve
theDBguy
You're welcome. You probably didn't need another subform, you could have just moved the listbox outside of the original subform and place it where you have the new subform now and do the same thing with the Current event.
On any case, good luck with your project.
fredrisg
That's a good suggestion . . .
On any event, I'm using more subfrms now that contain live data that I used to place in listboxes . . . since drilling down into a form on a slow data server wasn't going over well with the users.
Since a lot of folks use the tracking solution now known as 'SPE' (Start - Programs - Excel), I'm making my apps look more 'excel' like with the datasheet views . . . but with all the relational perks with access not to mention the report writer.
So I'm back into the learning curve with subforms . . . and one famous movie cop from the 70s used to say: a programmer has got to know the subfrm limitations!
Thanks again,
Steve
theDBguy
You're welcome (again). We're happy to help. Best of luck with your project.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.