> if used('tablename') = .F. > use data\tablename in 0 > endif > You can avoid that with code like this.
USE Data\TableName IN SELECT('TableName') If the table is open, the command is ignored and if it's not, the table gets opened in the next available work area. Regards, Jim _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.