Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.visual.basic    |    MS Visual Basic discussions, NOT dot-net    |    10,840 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 10,389 of 10,840    |
|    Geoff to All    |
|    Opening sequential files    |
|    17 Jan 07 23:01:15    |
      From: gfriar@freenetname.co.uk              I have a sequential text file, Clients.txt, and when my form loads I would       like the first record only to be displayed - that's if it exists! Initially       Clients.txt is blank. Well I 'm getting error messages when the below code       is triggered for an empty file.                            Private Sub Form_Load()              Dim Firstrec As Boolean                            Firstrec = False                             FileName = App.Path & "\Clients.txt"               Open FileName For Input As #1                             Do While Not (EOF(1) Or (Firstrec = True))               Call ReadCLientRec               Call DisplayClientRec               Firstrec = True               Loop                             Close #1               End Sub                            What's up with this VB6 code and is there an easier approach? Any help       would be appreciated              Thanks              Geoff              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca