- Jan 5, 2001
- 3,144
- 10
- 81
I need to load a listbox at Form Load time with information from a random access file.
Dim mess As Message
Dim pintRecNum As Integer
Open mstrAppPath & mstrFileName For Random As 1 Len = 200
pintRecNum = 0
mstrList = mess.lname & mess.date
Do While ...
Get 1, pintRecNum, mstrList
lstMessages.AddItem mstrList
pintRecNum = pintRecNum + 1
Loop
Close 1
I can't think of the DO WHILE condition, it needs to loop until the end of the file, but I can't get it to work. Any suggestions?
Dim mess As Message
Dim pintRecNum As Integer
Open mstrAppPath & mstrFileName For Random As 1 Len = 200
pintRecNum = 0
mstrList = mess.lname & mess.date
Do While ...
Get 1, pintRecNum, mstrList
lstMessages.AddItem mstrList
pintRecNum = pintRecNum + 1
Loop
Close 1
I can't think of the DO WHILE condition, it needs to loop until the end of the file, but I can't get it to work. Any suggestions?