RecordSource not saving
Posted on 2011-02-21
Ive been building an app in MSAccess, which runs a report in VBA.
The code works great on one PC, but in every other PC in the office it doesnt work at all! And Im scratching my head over it!
The code its running is similar to:-
Report_FaultLogs_Standard.RecordSource = "SELECT * from myTable;"
DoCmd.OutputTo acOutputReport, "FaultLogs_Standard", acFormatPDF, defaultSaveLocation & reportTitle & "-Standard-" & varBranch & ".pdf", False, "", 0, acExportQualityPrint
It runs but on every PC it runs with the default RecordSource, its like it ignores the line
RecordSource line, and runs the report on every PC, but on one it runs the RecordSource line and saves it.
Any ideas how I can fix this? Ive been looking at a way of saving the RecordSource back to the report and then being able to run the report with the recordsource saved back to it, but cant figure any method to save the code.