
HELP, TTX file and using a ADO Rs
Ive been to the KB, the forums and the what they call a help files.
I still cant get this damn thing to work,
really stimple access97 database .. one table, one field.
What the hell is the TTX file supposed to look like ..
this is what mine says.
Serials.TTX
SerialNumbers String 50
my report says its using the serials.ttx from what i can tell and
i have the SerialNumbers field showing in the report.
My code ......
-------------------------------------------------------
Viewer Form
Option Explicit
Private Sub Form_Load()
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim SQL As String
Dim fld As ADODB.Field
Screen.MousePointer = vbHourglass
SQL = "SELECT Products.SerialNumbers FROM Products WHERE
(((Products.SerialNumbers) Like ""5%""));"
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=.\SerialNumbers.mdb;"
rst.Open SQL, cnn, adOpenKeyset, adLockOptimistic
Dim crxApp As New CRAXDRT.Application
Dim crxRpt As CRAXDRT.Report
'REPORT3 was created with a TTX file
Set crxRpt = crxApp.OpenReport(App.Path & "\serialnumbersreport3.rpt")
CRViewer1.ReportSource = crxRpt
' just a check to make sure im getting data in the Rst and yes there is.
Do Until rst.EOF
Debug.Print rst.Fields("SerialNumbers").Value
rst.MoveNext
Loop
crxRpt.Database.Tables(1).SetDataSource rst, 3
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub
----------------------------------
Form unload
close the rst and cnn code
--
Notice: Spelling mistrakes left in for people who
need to correct others to make their life fulfilled.