M
Mark Andrews
I have been stumping people on this newsgroup but I haven't given up yet.
Hopefully someone will be willing to try and understand the question and
help me out.
I am designing a system that has the user navigate to a form with a listbox.
The user can filter the listbox and change the underlying query that drives
the list box in various ways. Once they have filtered and sorted the
listbox how they
want they double click on a row and a new form opens which shows detail
records and any related records in subforms.
So The listbox might start out with 4000 records and the user filters it
down to 45 and then clicks on number 23 and the new form opens on record 23
of 45 and allows the user to edit details.
My issue is that I want to allow the form with the list box to have queries
that pull data from multiple tables (example: list accounts and show sum of
sales in one column and sort descending by sales) and allow filtering on
various columns (example filter where sales > 50000) and once I do that I
need to figure out the best way to show something like (when the user clicks
on record 23 I would like the detail form to show the underlying 45 accounts
sorted by sales descending). However the user would only be editing details
on accounts and see individual related sales records.
I made it work using this method:
- I created a table tblIDTemp (stored in front end, with two columns
(autonumber and column to hold ID number)
When user clicks on row:
- delete recs in tblIDTemp
- add new recs to tblIDTemp (based on current recs in listbox)
- query that drives the detail form always joins to tblIDTemp and sorts by
Autonumber column (this achieves the same filtering and sorting that the
listbox had)
Question is:
Any better ways to make this happen? Don't like all this deleting and
adding of records but can't figure any other way that would work. Guessing
my front end will grow like crazy.
Thanks in advance,
Mark
Hopefully someone will be willing to try and understand the question and
help me out.
I am designing a system that has the user navigate to a form with a listbox.
The user can filter the listbox and change the underlying query that drives
the list box in various ways. Once they have filtered and sorted the
listbox how they
want they double click on a row and a new form opens which shows detail
records and any related records in subforms.
So The listbox might start out with 4000 records and the user filters it
down to 45 and then clicks on number 23 and the new form opens on record 23
of 45 and allows the user to edit details.
My issue is that I want to allow the form with the list box to have queries
that pull data from multiple tables (example: list accounts and show sum of
sales in one column and sort descending by sales) and allow filtering on
various columns (example filter where sales > 50000) and once I do that I
need to figure out the best way to show something like (when the user clicks
on record 23 I would like the detail form to show the underlying 45 accounts
sorted by sales descending). However the user would only be editing details
on accounts and see individual related sales records.
I made it work using this method:
- I created a table tblIDTemp (stored in front end, with two columns
(autonumber and column to hold ID number)
When user clicks on row:
- delete recs in tblIDTemp
- add new recs to tblIDTemp (based on current recs in listbox)
- query that drives the detail form always joins to tblIDTemp and sorts by
Autonumber column (this achieves the same filtering and sorting that the
listbox had)
Question is:
Any better ways to make this happen? Don't like all this deleting and
adding of records but can't figure any other way that would work. Guessing
my front end will grow like crazy.
Thanks in advance,
Mark