Craxdrt

gchwee
04-17-2004, 07:34 PM
Well. sir, Yes.I running this from VB6.0. I also using the Access. And I did set my crystal report's database connection to ADO. Yes, And I using the Active X Crystal Design Library(CRAXDRT). But the coding is not work.

ERROR MSG: The Field name is not known Private Sub Form_Load()
Dim crxApp As New CRAXDRT.Application
Dim Report1 As New CRAXDRT.Report
Dim myname As String
Dim sSQL As String
Dim datein, dateout
Screen.MousePointer = vbHourglass
Set Report1 = crxApp.OpenReport(App.Path & "\ChuHuoSub.rpt")
myname = (ReportMenu.Text1.Text)
datein = CDate(ReportMenu.Text2.Text)
dateout = CDate(ReportMenu.Text3.Text)
Report1.DiscardSavedData
sSQL = "{ChuHuo.Name} = '" & myname & "' AND {ChuoHuo.Date} BETWEEN #" & datein & "# AND #" & dateout & "#"
Report1.RecordSelectionFormula = sSQL 'error here
MsgBox Report1.RecordSelectionFormula
CRViewer91.ReportSource = Report1
CRViewer91.ViewReport
CRViewer91.Zoom 94
Screen.MousePointer = vbDefault
End Sub

MSGBOX show that--> {ChuHuo.Name} = 'ken' AND {ChuHuo.Date} BETWEEN #1/1/2003# AND #2/1/2004#

Not matter how, Thanks for your help, sir.

MKoslof
04-19-2004, 07:49 AM
I already answered this question in your other post. Please do not post the same question in multiple posts. Thank you.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum