Subform Problem

  • Thread starter Thread starter Keith
  • Start date Start date
K

Keith

Hello,
I have an Access form that contains a subform. the subform is connected to
an access table. I need to have VBA (or I could use a query) to update the
access table. However, the data shown in the form do not update. checking
error messages in VBA, I discovered that the VBA could not write to the table
because it is locked by the subform that is in the form.
How can I work around this? Is it possible to unlock the table so the VBA
can update it?

Thank you,
Keith
 
Hello,
I have an Access form that contains a subform. the subform is connected to
an access table. I need to have VBA (or I could use a query) to update the
access table. However, the data shown in the form do not update. checking
error messages in VBA, I discovered that the VBA could not write to the table
because it is locked by the subform that is in the form.
How can I work around this? Is it possible to unlock the table so the VBA
can update it?

Thank you,
Keith

If you set the subform to a query where the recordset property is set
to 'Snapshot' (not Dynaset - and make sure locks are set NoLocks),
then the subform won't lock your recordsource. Of course, the subform
will be read-only but it sounds like that's what you're after.

Hope this helps,
James
 
Thank you very much. that is helpful.
keith

Minton M said:
If you set the subform to a query where the recordset property is set
to 'Snapshot' (not Dynaset - and make sure locks are set NoLocks),
then the subform won't lock your recordsource. Of course, the subform
will be read-only but it sounds like that's what you're after.

Hope this helps,
James
 
Back
Top