>Anyone know why sometimes use + a nonexistent file generates an error, and sometimes instead opens a file selection box? I'd like to have it consistently generate an error that could be trapped? Thanks in advance.
You can simply Copy the ON ERROR example on VFP help!
Then, add further control on Error number.
e.g.
if ErrNum = 1884 && Duplicate Key
TableRevert(.f.)
endif
if you want to ensure the table is exist before use, change use coding:
if File("MayHere")
Use MayHere in 0 order tag myKey Alias IsHere
else
Use ? in 0 Alias IsHere && will give a fiel open dialog to open file...
endif
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.