I have "Report1", and sometimes I want the recordsource of Report1 to be Query "ABC", and sometimes I want the recordsource to be Query "XYZ".
I'm at the code right before I DoCmd.OpenReport, and I need to make this change. Can someone help me. I was trying to do this, but it didn't work.
stDocName = "Report1"
Application.Reports(stDocName).RecordSource = "ABC"
DoCmd.OpenReport stDocName, acPreview
Oh yes, I'm using Access 97!