N
neonx3
Hi,
I'm using Access 2000.
I want to open a report from a filtered form, which has the query
"Loadlist Query1" as its source (or whatever you call it). I think the
easiest way to do this is:
DoCmd.OpenReport stdocname, acViewPreview, "Loadlist Query1",
Me.Filter
but unless I specify the sorting order on the report, this doesn't
populate the report at all. Changing the statement to this:
DoCmd.OpenReport stdocname, acViewPreview, "Loadlist Query1" &
Me.Filter, Me.Filter
gives the correct, filtered records in the report, but they still are
not sorted. This makes sense, because I haven't specified a sort order
anywhere.
When I specify a sort order, then the first DoCmd statement works,
except that the Me.Filter statement (that is, the WHERE statement)
seems to be ignored. The second DoCmd statement gives the same thing
as the first.
Any idea what I'm doing wrong?
Thanks,
Danny Fingas
I'm using Access 2000.
I want to open a report from a filtered form, which has the query
"Loadlist Query1" as its source (or whatever you call it). I think the
easiest way to do this is:
DoCmd.OpenReport stdocname, acViewPreview, "Loadlist Query1",
Me.Filter
but unless I specify the sorting order on the report, this doesn't
populate the report at all. Changing the statement to this:
DoCmd.OpenReport stdocname, acViewPreview, "Loadlist Query1" &
Me.Filter, Me.Filter
gives the correct, filtered records in the report, but they still are
not sorted. This makes sense, because I haven't specified a sort order
anywhere.
When I specify a sort order, then the first DoCmd statement works,
except that the Me.Filter statement (that is, the WHERE statement)
seems to be ignored. The second DoCmd statement gives the same thing
as the first.
Any idea what I'm doing wrong?
Thanks,
Danny Fingas