-
I am able to display a sorted table but my SQLQuery statement is being ignored. What's wrong with the code below? Am I missing some DLLs or components connection in my Form?
Private Sub Command1_Click()
Dim strDbName As String
'Get the xtreme.mdb database location
strDbName = "c:\Program Files\Seagate Crystal Reports\Xtreme.mdb"
With crptPublishers
'Assign the data file location for report
.DataFiles(0) = strDbName
'Assign the report file name
'.ReportFilename = App.Path & "\maillabl.rpt"
'Set up the report control
.SortFields(0) = "+{Customer.country}"
.SQLQuery = "SELECT DISTINCT Customer.country FROM Customer"
.Action = 1
End With
End Sub
-
have you selected the crystal report reference from VB 6? Try that.