patriciaxxx
Programmer
The following Microsoft example says the record count returned is 2 but I get 3. It seems to count the headings in the text file as a row of data.
What am I doing wrong?
The text file is as Microsoft states:
FirstName LastName HireDate
Nancy Davolio 16-12-12
Robert King 16-12-12
The code is Microsoft states:
What am I doing wrong?
The text file is as Microsoft states:
FirstName LastName HireDate
Nancy Davolio 16-12-12
Robert King 16-12-12
The code is Microsoft states:
Code:
[COLOR=#204A87]Function TestSchema()
Dim db As Database, rs As Recordset
Set db = OpenDatabase("c:\my documents", False, _
False, "Text;DATABASE=c:\my documents;TABLE=contacts.txt")
Set rs = db.OpenRecordset("contacts.txt")
rs.MoveLast
Debug.Print "Record count= " & rs.RecordCount
rs.Close
End Function
[/color]