err " This field name is not known " ?
hi there
i want to know why this error happen
" This field name is not known "
when i try to open the crystal report
i am using this code :
Code:
Option Explicit
'
Dim report_app As New CRAXDDRT.Application
Dim report As New CRAXDDRT.report
Dim rep_path As String
Private Function common_report()
Dim dd As String
dd = "555"
On Error GoTo reportnotin
If rn = 1 Then
rep_path = App.Path & "\" & "all voters.rpt"
ElseIf rn = 2 Then
rep_path = App.Path & "\" & "holders voters.rpt"
ElseIf rn = 3 Then
rep_path = App.Path & "\" & "holder voters.rpt"
report.RecordSelectionFormula = "{voter_info.voter_holder}='" + dd + "'"
End If
Set report = report_app.OpenReport(rep_path)
report.Database.Tables(1).Location = App.Path & "\db3.mdb"
'report.Database.Tables(1).Location = "\\192.168.0.90\db\cranet.dat"
With report.Database.Tables(1).ConnectionProperties
.Add "password", "2041981asamir"
End With
reportnotin:
End Function
Private Sub Form_Load()
'rn = 1
common_report
'
'report.RecordSelectionFormula = "{voter_info.voter_id}='" + report_for + "' And {tests.test_date_med_wig}=#" + date_now + "#"
'report.RecordSelectionFormula = "{voter_info.voter_id}=2041981"
'
cryview1.ReportSource = report
cryview1.ViewReport
End Sub
how to solve this case >>
thanks
Re: err " This field name is not known " ?
Does the field you specific exist in your database?