Trying to change the recordsource on a Access97 report in VB5;
The code follows.
Dim objAccessSend As access.Application
Set objAccessSend = CreateObject("Access.Application")
With objAccessSend
.OpenCurrentDatabase "c:\celpril\dbnov.mdb"
'This is where I get the error template misspelled or not open
.Reports("template").Report.RecordSource = "db" & Format(Date - 1)
.DoCmd.SendObject acReport, "template", acFormatRTF, _
"Attached report", False
End With
Thanks
Randy