Patrick,
When the form is modal, code will stop at the DO FORM command. When it is modeless, the code after the DO FORM can execute immediately, and the USE statement is closing the table.
I would suggest using a private datasession in the form, and put the code that opens the table in the load() method of the form. The table will close automatically when you close the form.
>hi steve -
>
>the table is a free table, and here is the form call:
>
>
>*-----------------------------------------------open EVAL_CAT table----
>EVAL_CAT_Table_Spec = ALLTRIM(PIX_Data_Dir_Spec) + ;
> ALLTRIM(CATALOG_Record_Object.Mod_Name) + '\' + ;
> ALLTRIM(CATALOG_Record_Object.Mod_Name)
>
>IF ( USED ('EVAL_CAT') )
> SELECT EVAL_CAT
> USE
>ENDIF
>
>SELECT 0
>USE (EVAL_CAT_Table_Spec) ALIAS EVAL_CAT EXCLUSIVE
>SET ORDER TO TAG Pict_Num
>
>DO FORM frm_Happy_Snappy
>
>SELECT EVAL_CAT
>USE
>
>
>i never specify any data session, so i guess i'm using the global data session all the time.
Steve Gibson