I'm using VB6 and ms access as database..I got MSHFLEXGRID1 and MSHFLEXGRID2..after I load data into MSHFLEXGRID1 then choose some into MSHFLEXGRID2. I would like to produce report using activereports based on the selected data in the MSHFLEXGRID2..here is my code :)
Code:
Private Sub cmdReport_Click()
Dim myCard As String
myCard = "Select Student_ID,s_name FROM student where Student_ID = '" & MSHFLEXGRID2.TEXT & "'"
With myReport
.DataControl1.ConnectionString = conn
.DataControl1.Source = myCard
.fName.DataField = "s_name"
.fID.DataField = "Student_ID"
.show
End With
Unload Me
End Sub