>I want to allow my user to choose a table by use ?. I want to trap his selection and depending on the results of his choice my program will act accordingly. For instance, if he aborted and did not use a dbf file, I may end the procedure etc.
>How can I trap the results of my user's choice into a variable?
Assuming that you were in a SELECT area with no file open, you could check the file name opened by using the DBF function:
SELECT 0
USE ?
cFileNameOpened = DBF()
cAliasUsed = ALIAS()
cFileNameOpened and cAliasUsed will be empty strings if no file is opened.