T
thomast via AccessMonster.com
How can i save a report without Access messing up the reports recordsource?
The following case illustrates my problem:
DoCmd.OpenReport "Utstyrsutvalg", acViewDesign
Reports!Utstyrsutvalg.RecordSource = sqlStatement
DoCmd.Close acReport, "Utstyrsutvalg", acSaveYes
DoCmd.OpenReport "Utstyrsutvalg", acViewDesign
sqlAfterSave = Reports!Utstyrsutvalg.RecordSource
sqlAfterSave <> sqlStatement!! sqlStatement i pretty complex, but a valid SQL
statement, and the report works fine before i save it.
The following case illustrates my problem:
DoCmd.OpenReport "Utstyrsutvalg", acViewDesign
Reports!Utstyrsutvalg.RecordSource = sqlStatement
DoCmd.Close acReport, "Utstyrsutvalg", acSaveYes
DoCmd.OpenReport "Utstyrsutvalg", acViewDesign
sqlAfterSave = Reports!Utstyrsutvalg.RecordSource
sqlAfterSave <> sqlStatement!! sqlStatement i pretty complex, but a valid SQL
statement, and the report works fine before i save it.