Information générale
Catégorie:
Codage, syntaxe et commandes
>Hi,
>I open a free table exclusively. & have the datasource of text boxes linked to the table for editing. I've also included a previous, next, last, first, add & delete buttons.
>
>When ever I issue a pack & then close all command this error shows up - cannot access selected the table.
>
>Anyone knows the prob.
>
>Thanks
>
>Andrew
Do you open the tables in the data environment of the form ? And do you still have the form open when you issue CLOSE ALL ? In that case, when the form is destroyed, it tries to close the table when it gets released. (Actually somewhat later, see "Event Firing Sequence" in Help.)
Don't close the table yourself, because it will be closed automatically. (If the table was open before you started the form, it will be left open thought, and it still needs to be open when the form closes.)
Another way is to open AND close the table yourself (open it before starting the form, and close after it is released, or put the code in the init() and destroy() event of the data environment). You must set the AutoOpenTables and AutoCloseTables of the dataenvironment to .F. too.
Marc Van Riet
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement