>i want to know if they exist another solution because i have a lot to change like this
About the only way I can think of so you don't have to change all your "USE" statments would be to use an ON ERROR statement passing the error() and message() parameters. If Error() is 24, you could parse out the < name > from Message() and then do the same sort of code - ie - just do the select.
On Error do CatchError with Error(), Message(), Message(1), Program(), LineNo()
Procedure CatchError(tnErrorNo, tcMessage, tcMessage1, tcProgram, tnLineNo
Local lcOnError, lcAlias
lcOnError = On("Error")
ON ERROR
If tnErrorNo = 24
Alltrim(lcAlias) = Substr(tcMessage, 1, At(" ", Message()))
Select (lcAlias)
Resume Next
endif
On Error &lcOnError
Return
It might work ;)
Alan