Just keep a list of the aliases you used when you opened the tables, say in an array aTables, or a collection,and when you want to close them iterate through the list and do something like:
for i = 1 to alen(aTables, 1) use in select(aTables[i]) endfor If the alias is opened, it'll close it. If not, no errors or anything will happen, it will just continue. No type checking or any further complication required. -- Alan Bourke alanpbourke (at) fastmail (dot) fm _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/1437213026.2030429.326870225.6867b...@webmail.messagingengine.com ** 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.