Error 3188

J

Jabba

Right, I'm sure I'll miss something out of this explanation but I guess I've
got to start somewhere.

I have Table 1 that has a one-to-many relationship with Table 2 which, in
turn, has a one-to-many relationship with Table 3

I have a main form whose record source is a query containing Tables 1 & 2.
On this main form I have 2 subforms in datasheet view - these are very
similar to each other, with a main difference being a flag that is set to
either true or false. Both of these subforms have a record source of a query
containing Table 3, and uses 'WSRef' field for Child/Master links to the main
form (WSRef exists in Tables 2 & 3)

Each subform makes use of the AfterUpdate event, which runs some
calculations to update fields on the main form.

Now here's the problem. When I amend any field within one of the subforms,
the record selector changes to 'edit' mode and, when I try to change the
focus to a field outside of the subform, I get the Error 3188 "Could not
update;currently locked by another session on this machine".

I've trawled through all the forums and tried various 'solutions' such as
forms!formname.requery, but to no avail. Would really appreciate any help.

Thanks
Jason
 
B

Bob Quintal

When the same table is used twice, either as two subforms or as
both parent and child form, or two independent forms, you will
get this message. That's because Access knows someone has
changed the record but doesn't know who and can't figure that it
is you.

Why use two separate subforms? There's probably a simple way to
present the data you need as a single subform.

Q
Right, I'm sure I'll miss something out of this explanation
but I guess I've got to start somewhere.

I have Table 1 that has a one-to-many relationship with Table
2 which, in turn, has a one-to-many relationship with Table 3

I have a main form whose record source is a query containing
Tables 1 & 2. On this main form I have 2 subforms in datasheet
view - these are very similar to each other, with a main
difference being a flag that is set to either true or false.
Both of these subforms have a record source of a query
containing Table 3, and uses 'WSRef' field for Child/Master
links to the main form (WSRef exists in Tables 2 & 3)

Each subform makes use of the AfterUpdate event, which runs
some calculations to update fields on the main form.

Now here's the problem. When I amend any field within one of
the subforms, the record selector changes to 'edit' mode and,
when I try to change the focus to a field outside of the
subform, I get the Error 3188 "Could not update;currently
locked by another session on this machine".

I've trawled through all the forums and tried various
'solutions' such as forms!formname.requery, but to no avail.
Would really appreciate any help.

Thanks
Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top