i thought of that.
just wondering if there's a better way.
As others already told you about the parsing method, you can also evalute
the possibility to change the recordsource of the form from
SELECT * FROM dbo.whatever
to
whatever
so then in the report you will uise the following code:
Me.Recordsource = Forms("yourformnamehere").Recordsource
Me.RecordSourceQualifier = Forms("yourformnamehere").RecordSourceQualifier
Obviously, this solution is not suitable for most cases, e.g. where the recordsource
is a more complex SQL statement. In that case, anyway, you can create a VIEW
or a STORED PROCEDURE with the original SQL statement and then use the same
procedure I described.
Bye.