Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stop Browse on all Files

Status
Not open for further replies.

JaneJantz

Programmer
Sep 13, 2000
55
0
0
US
Is there a way to stop FoxPro from showing all tables in the directory if I have a bug in my program? For instance, if a file gets closed and I issue a Browse, the OPEN window pops up showing all tables in my directory.

Is there a set command or something that would just give me an error before I get the OPEN table window? Is there a way to shut down that feature? Can I trap for something globally rather than having to check DBF() before a command?

Thanks for any suggestions.
 
If you unsuccesfully open table,
you may check by "on error" error code 1113
(File not open).
But if you regularly close table and later issue Brow,
i think test dbf()="" before browse is only chance..
Tesar
 
None that I know of. You're going to have to test for it. Same as any other command which does any sort of work on tables like LOCATE, APPEND, SEEK. They always assume there is a table open in the current work area, and if there isn't you need to select one in order for the command to complete without an error.
The safeest and most readable thing to always do is make sure you have the table selected that you want to work on. That way, if the table isn't open and you do for instance a SELECT "MyTable", you will get an error without the dialog poping up.
Dave S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top