Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21100

How to produce report in Activereports based on data in MSHFLEXGRID?

$
0
0
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


Viewing all articles
Browse latest Browse all 21100

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>