I have a Form open with a sub-form. The sub-form data is connected, through queries, to a table. I want to update the data in the table. This will require running several queries to update the table. I have the code to do the table updates. Of course it won't run as long as the form sub-form is open. It has the table locked.
I created code, attached to a button on the Form Sub-Form, that runs a macro that closes the form Sub-Form and opens a dialog form. The Open event on the dialog form runs the table update queries. The problem is..it fails with 3211 Error. Even though I closed, with a macro, the Form Sub-form that had the table locked...it still thinks it is locked. If I run the code (queries) separately, without opening the Form Sub-form, the code works fine.
I must assume the Form Sub-Form has not released the lock on the table.
How can I check (looping check) to validate the Form Sub-form is closed and the Table is unlocked before running the update code/queries?
Thanks
I created code, attached to a button on the Form Sub-Form, that runs a macro that closes the form Sub-Form and opens a dialog form. The Open event on the dialog form runs the table update queries. The problem is..it fails with 3211 Error. Even though I closed, with a macro, the Form Sub-form that had the table locked...it still thinks it is locked. If I run the code (queries) separately, without opening the Form Sub-form, the code works fine.
I must assume the Form Sub-Form has not released the lock on the table.
How can I check (looping check) to validate the Form Sub-form is closed and the Table is unlocked before running the update code/queries?
Thanks