Assign the recordsource to report at runtime

T

Tim

Here is the code ...
strSQL = "SELECT tblStudents.StudID, tblStudents.SName WHERE
tblStudents.StudID= '" & glbStudID & "'
Set rst = MyDatabase.OpenRecordset(strSQL)

How can I assign a recordsource to my report, rptStudents at runtime? Note:
I cannot use Me!ReportName because this is a sub procedure. It's called by
another sub procedure. Thank you
 
R

ruralguy via AccessMonster.com

You can assign the RecordSource of a report in the Open event of the Report.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top