In addition to what Jim said, you can USE a table AGAIN, like this:
if not used("MyTable")
use MyTable again
endif
or:
if not used("MyTable_Temp")
use MyTable again alias MyTable_Temp
endif
This will avoid error messages - unless the table was opened for exclusive use before.
>Hi everyone:
>
>sorry for the above title not being very descriptive. I couldn't think of an easy and short explanation for my problem.
>
>I am referencing a table name by a variable. I then check to see if the table name is being used. if not, then i want it to be used. this is to ensure that i don't get an error message saying table is in use.
>
>the variable referencing the table name is "table_name". my code is as follows:
>
>if used(table_name) = .f.
>use (table_name) in 0
>endif
>
>unfortunately, my program seems to skip the If portion of it and then goes to the use portion and, since the table name is being used, gives an error message. i ignore the message and everything is fine, but i want to be able to avoid this message.
>
>Does anyone have any advice? If you need any further details, please let me know.
>
>Thanks in advance,
>
>Paul
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)