|
Question : Rpts-writing/using a log
|
|
Back again.
I've got a form that sets up parameters for the query behind a report. (There are MANY alternate parameters, and a bunch of reports will in fact ultimately be generated from a single button-push, sequentially).
The query is NOT UPDATEABLE (and it contains lots of information which the actual report needs, but the log doesn't).
I need to capture the ID numbers from that query (as run by report) and "dump" them into new records in an existing log table. Other information could be added subsequently (by code, either in the form or in the report modules) from info on the form, which is still open.
What's the neatest, cleanest way? I can make the report write the ID field to a text file, but then I'll have to import that to a table. I've managed to create a table - but how do I WRITE to a table from within the report? I've thought of recordsetclone, but that doesn't work with Reports.
For previous logging efforts, I've managed to use the SQL from the original query as the source for a recordset, but I can't seem to figure out how I could get an updateable recordset in this case.
Marilyn Justman
|
|
Answer : Rpts-writing/using a log
|
|
Marilyn,
<>>
Either method would work, but I like the query approach best for a couple of reasons.
First, the updating of the table is seperate from the report. If new reports are added, I may or may not need to run a query for each (i.e. I might be able to run 3 in a row, a query, the next 2, then a query, etc.)
Second, it's a tad less work.
Third, it's a lot more obvious what's going on. When you bury the code in the report, you'd need to open each report to figure out what's going on. With everything in a query def, it's going to make future changes easier.
Jim.
|
|
|
|