Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform based on form recordset

Status
Not open for further replies.

herbivorous

Technical User
Mar 28, 2002
32
US
I am putting together a database where most everything is on different tabs of a single form. There will be a tab showing the detail of a single record, a tab where the user will specify and impose their filtering criteria, then (I hope) a tab that will give (essentially) a datasheet view of the filtered records. Though this may well strike the more experienced as a particularly crack-addled idea. I'd be interested to hear.

Anyhow, I'm scratching my head over how to make the whole-list tab. It seems to require a subform, but one based on the recordset underlying the main form, which is currently an SQL statement, potentially filtered either by the filter tab or user-imposed filters by other means. The filter will need to be passed back and forth.

Should I just make the subform on the 'list' tab unbound, and pass the filter from the main form to it (can I do that?) or is there a direct way to tap into the form's recordset?
 
See this post and follow the link to the Sample DB I posted...

There is a Form that will filter data and apply it to a listbox.

Good Luck and let me know if you need any assistance.


"I know what you're t'inkin', ma petite. Dat Gambit... still de suave one, no?"
 
Of course it would help if you have the URL....

DUH!

thread702-563930

"I know what you're t'inkin', ma petite. Dat Gambit... still de suave one, no?"
 
That will actually come in quite handy when I get to it, but to get there, I need to solve this initial problem.

I have a TabControl in Forms frmPeople that contains only a subform -- Child97, sourceobject being frmsubList. When I hit that page, I want to

Set frmsubList.recordset = frmPeople.recordset

But it doesn't seem to be quite that simple.

I can, from within frmSubList onCurrent do

Set Me.recordset = frmPeople.recordset

which demonstrates that this is possible -- but the OnCurrent makes a hash of things, as it flashes itself through all 2000+ records before getting itself settled, and does this every time I change records. Hash.

I can't seem to find an appropriate reference to do this Set from outside of frmSubList. I need to have it trigger whenever you reach the page, which is also when Child97 gets the focus.

If this makes any sense. . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top