'first load and clean report
Load deNalLeg
With deNalLeg
Set rptNalLeg.DataSource = Nothing
rptNalLeg.DataMember = ""
If .rsNal.State Then .rsNal.Close
...BEGIN COMMENT:command "NalLeg" get's loaded at this point, Before I could assign it the datasource I want! this means it tries to open the original "Data Source" which might not be the Data Source I want...END COMMENT
End With
deNalLeg.rsNal.Open mystring, cnmyApp, adOpenStatic, adLockOptimistic
'ASSIGN RS TO REPORT
Set rptNalLeg.DataSource = deNalLeg.rsNal
...
Load deNalLeg
With deNalLeg
Set rptNalLeg.DataSource = Nothing
rptNalLeg.DataMember = ""
If .rsNal.State Then .rsNal.Close
...BEGIN COMMENT:command "NalLeg" get's loaded at this point, Before I could assign it the datasource I want! this means it tries to open the original "Data Source" which might not be the Data Source I want...END COMMENT
End With
deNalLeg.rsNal.Open mystring, cnmyApp, adOpenStatic, adLockOptimistic
'ASSIGN RS TO REPORT
Set rptNalLeg.DataSource = deNalLeg.rsNal
...