What I think are the relevant parts of my program ...
Sub App_Start
...
If FileExist(Filepath & "Autolog.atl") = false then
fileopen(c1,Filepath & "Autolog.atl",cWrite)
Fileclose (c1)
NewVehicle ()
vehicle.Show
else
fileopen(c1,Filepath & "Autolog.atl",cRead)
s = fileread(c1)
if s <> eof then
for x=1 to 7
i = StrIndexOf (s,",",0)
if i < 0 then
Col(x) = SubString(s,0,StrIndexOf(s," ",0))
x=7
else
Col(x) = SubString(s,0,i)
s= SubString(s,i+1,StrLength(s))
end if
next x
...
FileClose(c1)
LoadData () ' <<<<<<------------------------error occurs here when it returns after doing the LoadData sub
else
FileClose (c1)
NewVehicle ()
Vehicle.Show
end if
end if
....
End sub
Sub LoadData
...
fileopen(c1,OdometerRecs,cRead)
s = fileread(c1)
do while s <> EOF
....
loop
fileclose(c1)
DataRecords.Show
...
End Sub
Sub DataRecords_Show
.....
Set4OdoTab(10)
End Sub
Sub Set4OdoTab(TabRef)
.... 'sets up tabbing conditions for controls in datarecords form
End Sub