D
Dave the wave
Dirk:
You were providing me with some information regarding creating a subform
that could be filtered and sorted, then using the filter/sort info from the
subform to create a SQL statement that would create the recordset for a
report. I was away for a few days and I can not find the thread anywhere.
So far, every time I try to run my code I get a parameter dialog window
asking for the parameter that was supplied by the WHERE clause of the SQL
statement. As I recall, you thought the field might not be part of the
subforms underlying recordset. I did check on this and it seems to me that
it is.
I was thinking it might be better to simply layout a plan for creating all
the items needed and ask you to comment or point out any errors.
FORMS:
frmMain
sfrmSub
QUERIES:
qrySub
qryMain
PLAN:
qryMain: multi-table query. Certain columns from all records for calculating
statistical data
frmMain: displays calculated data and sfrmSub.
qrySub: multi-table query. Specific columns (different from the qryMain)
from all records, until "filter by selection" filtering is applied at
run-time.
build SQL statement using the Filter property, and Sort property of sfrmSub.
Select report design based on the field in the SQL WHERE clause. (I think
the report design will need to change depending on how the user has set up
the filtering. Optionally, reassign report controls at run-time.)
DoCmd OpenReport using the SQL statement to create the underlying record
set.
I'll ad my code after I get your initial reaction to my general plan.
Thank you very much for your time and attention.
You were providing me with some information regarding creating a subform
that could be filtered and sorted, then using the filter/sort info from the
subform to create a SQL statement that would create the recordset for a
report. I was away for a few days and I can not find the thread anywhere.
So far, every time I try to run my code I get a parameter dialog window
asking for the parameter that was supplied by the WHERE clause of the SQL
statement. As I recall, you thought the field might not be part of the
subforms underlying recordset. I did check on this and it seems to me that
it is.
I was thinking it might be better to simply layout a plan for creating all
the items needed and ask you to comment or point out any errors.
FORMS:
frmMain
sfrmSub
QUERIES:
qrySub
qryMain
PLAN:
qryMain: multi-table query. Certain columns from all records for calculating
statistical data
frmMain: displays calculated data and sfrmSub.
qrySub: multi-table query. Specific columns (different from the qryMain)
from all records, until "filter by selection" filtering is applied at
run-time.
build SQL statement using the Filter property, and Sort property of sfrmSub.
Select report design based on the field in the SQL WHERE clause. (I think
the report design will need to change depending on how the user has set up
the filtering. Optionally, reassign report controls at run-time.)
DoCmd OpenReport using the SQL statement to create the underlying record
set.
I'll ad my code after I get your initial reaction to my general plan.
Thank you very much for your time and attention.