Yes, that makes sense, I was thinking of doing something like that. I was hoping however that there may be a cleaner way of doing this. I plan on making lots of different reports faxable and I don't really want to have to make 2 copies of each one (one with no filter which I can use for display, and one that has this dynamically changing filter).
Main Topics
Browse All Topics





by: nico5038Posted on 2008-05-07 at 14:45:41ID: 21520604
In a case like this I dynamically create the query before activating the report.
port2")
Make sure that a reference is opened for the DAO library then you can use:
dim qd as DAO.querydef
set qd = currentdb.querydefs("qryRe
qd.SQL = "select * from tblX where customerid=" & Me.CustomerID
'==> Here execute the DoCmd.OutputTo
Keep in mind that the "qryReport2" is filled dynamically and that the real content (when you use the original report query) will be overwritten!
Getting the idea ?
Nic;o)