
Report Designer Component Problem With RecordSelectionFormula
I have form (frmCourses) with treview (treTree) and list wiew - every
treview node represents one course
after clicking this node - listview displays course students.
Now I want print only selected course students.
I have Access97 database with Courses table and Students table.
CourseID field is in every Students table record .
This is my code:
Private Sub Form_Load()
Report.Database.SetDataSource DatabaseLocation
Report.RecordSelectionFormula = "{CourseID} = " &
Val(frmCourses.treTree.SelectedItem.Key)
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
End Sub
Until I change treview node report is O.K. (= for the first time)
After changing treview node - report without data!
Jan
Quote:
> Show us some code...