Use the Fileinfo routine.
If fileinfo(fv,1) = (if 0 not open, if 1 open)
This checks that is a valid file that is open.
This is good practice to test the file is open before opening, as reopening
the file clears all previous record locks held on that file by that user and
can cause fatal
Wouldn't even BETTER practice be to just ensure that the file is open in
the calling program?
If this is a well used routine that is called for a couple of million
records, then even the overhead of this simple check can quickly mount.
Whilst I agree that it is good that code should try catch
All GREAT points but when you are dealing with old code that they want to
just maintain and NOT enhance this is the kind of situations you have to
deal with. I COMPLETELY agree with you but sadly my company is moving to a
vb.net front end and maintaing the green screen side of the system has a