From my past experience helping folks with this type problem, the point where I find they run into issues is with the string comparisons from length issues...
Often, for random access files, a TYPE is used to store data, which sets strings to a specific length:
TYPE DataType
FirstName AS STRING * 20
LastName AS STRING * 20
Age AS _BYTE
END TYPE
DIM MyFile AS DataType
'Read in a record
INPUT firstname$ 'Get the name
IF firstname$ = MyFile.FirstName THEN
'Do Stuff
***********************
Now, with the above, chances are you'll NEVER find a first name that matches.
Reason??
The file might have a first name of "Bob" in it, and we might type the name "Bob" into the program, but no match is made.... Why?
MyFile.FirstName is a record of 20 characters, as defined by our TYPE. It's "Bob ", with 17 spaces at the end, instead of just "Bob".
If this *is* your issue, trim the strings to compare first:
IF LTRIM$(RTRIM$(firstname$)) = LTRIM$(RTRIM$(MyFile.FirstName)) THEN
'Do stuff