Hi I need to check that the number of lines produced in a .dat file is the same as the number of records in a access db table.

I just want to open the .dat file and count the lines. I tried this but it got stuck in a loop. Why ?
what did I do wrong.


Private Sub Command1_Click()
Dim filenum As Integer
Dim num As Long

filenum = FreeFile
num = 0
Open "c:\store\imascons.dat" For Input As #filenum
Do Until EOF(filenum)
num = num + 1
MsgBox num
Loop
Close filenum
MsgBox num



End Sub


This didnt work , anyone ?

Thx locutus