G
gr
Hello all,
I want to set the record source of a subreport on the Open
Event of the main report.
I have a long code in order to get the appropiate Record
source for the sub report (coded on the main report Open
Event). but when trying to set it using the statement
Me.srptSCMaintenance.Report.RecordSource = strRSMaintenance
the following error shows out
Error 2455: You entered an expression that has an invalid
reference to the Form/Report.
By debuging the code I can get what actually is helded by
strRSMaintenance and I think the SQL string is ok.
Debug.Print strRSMaintenance
SELECT qrySuitcaseStatus.MDID,
qrySuitcaseStatus.DeviceName, qrySuitcaseStatus.DeviceID,
qrySuitcaseStatus.SuitcaseID,
qrySuitcaseStatus.ABBSuitcaseID,
qrySuitcaseStatus.ListOfNamesID,
qrySuitcaseStatus.StoragePlace FROM qrySuitcaseStatus
WHERE (qrySuitcaseStatus.MDID Like 19)
I also tried with strRSMaintenance like this with no
success (same error)
SELECT MDID, DeviceName, DeviceID, SuitcaseID,
ABBSuitcaseID, ListOfNamesID, StoragePlace FROM
qrySuitcaseStatus WHERE (qrySuitcaseStatus.MDID Like 19)
What I'm doing wrong?
I want to set the record source of a subreport on the Open
Event of the main report.
I have a long code in order to get the appropiate Record
source for the sub report (coded on the main report Open
Event). but when trying to set it using the statement
Me.srptSCMaintenance.Report.RecordSource = strRSMaintenance
the following error shows out
Error 2455: You entered an expression that has an invalid
reference to the Form/Report.
By debuging the code I can get what actually is helded by
strRSMaintenance and I think the SQL string is ok.
Debug.Print strRSMaintenance
SELECT qrySuitcaseStatus.MDID,
qrySuitcaseStatus.DeviceName, qrySuitcaseStatus.DeviceID,
qrySuitcaseStatus.SuitcaseID,
qrySuitcaseStatus.ABBSuitcaseID,
qrySuitcaseStatus.ListOfNamesID,
qrySuitcaseStatus.StoragePlace FROM qrySuitcaseStatus
WHERE (qrySuitcaseStatus.MDID Like 19)
I also tried with strRSMaintenance like this with no
success (same error)
SELECT MDID, DeviceName, DeviceID, SuitcaseID,
ABBSuitcaseID, ListOfNamesID, StoragePlace FROM
qrySuitcaseStatus WHERE (qrySuitcaseStatus.MDID Like 19)
What I'm doing wrong?