close subform from the code ?

vivou

Registered User.
Local time
Today, 18:08
Joined
Dec 15, 2002
Messages
16
how can i close a sub form from the code ?
and open too!

maybe this is not the good way... i will explain what i want to do:

i have a list (subform) with data from table A.
i have unbound fields, on the main form, and on dbl clck on current item from the sub form, u can see in unbound fields the current selected data.
now i need to allow: delete, update data, but i cannot do that because i cannot act on my table A because the subform is based on this same table, and i get the message " the table is already open through the user interface..."

so i thought close it for a second, until do delete or update or new, and after the query call it back.

if u see somthing better to solve my problem, i want to know!!
thanks
 
Sounds like the only purpose for the subform is to find a record to display on the main form. If that is the case, you might consider changing your method. Make a mainform tha is bound to the query/table that you want to update. Add an UNBOUND combo to the form header. The wizard will walk you through the steps. One of the options will be to find a record on the current form. Check that option.
 

Users who are viewing this thread

Back
Top Bottom