Re: Access 2003 Error: 3218 Could not update; currently locked
- From: Salad <oil@xxxxxxxxxxx>
- Date: Thu, 21 Feb 2008 07:13:57 -0800
stuart wrote:
On Feb 19, 9:51 am, Salad <o...@xxxxxxxxxxx> wrote:
stmed...@xxxxxxxxx wrote:
On Feb 17, 2:52 pm, "Tony Toews [MVP]" <tto...@xxxxxxxxxxxxxxx> wrote:
stuart <stuart.med...@xxxxxxxxxx> wrote:
The 2nd user had tried to add about 28 records, the first 13
successfully. She said that she did not get any type of error message
that her remaining records were not being added (even though I have
coded an error handler to trap errors). She only realized later that
the last 15 records she keyed were never added to the table.
Does the user add the records by opening a new form, entering data and then close the
form? If so put the following code in the close command button code before the
docmd.close
If me.dirty= true then _
docmd.runcommand accmdsaverecord
This will trigger any messages before the form is closed.
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems athttp://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/
Thanks Tony for your response. To answer your question, the 2 users
are on 2 different forms, but likely would be accessing the same table
to add records. On these 2 forms, the user will key in the data on
the form, hit 'Save', and then enter additional records (without
exiting the form).
Is it possible you have a Me.Undo in your code? As in...you do an
validation routine in the BeforeUpdate event and if it doesn't pass you
do a Me.Undo?
I put some code like this
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Status <> "C" Then
Me.Undo
End If
End Sub
into a form. Then I opened the form, entered some data but set the
status to something besides a "C" and pressed the new record navigation
button. The record wasn't saved.- Hide quoted text -
- Show quoted text -
No, I don't have any Undo's in my code.
Yeah, I figured that one out as you have an error.
All of my forms are
unbound. I use transaction-based processing and only open up the
tables long enough to add records, and then close them.
Then you know know where your problem is.
Make post some of your code for adding new records.
You might want to redesign your form/code.
.
- References:
- Access 2003 Error: 3218 Could not update; currently locked
- From: stuart
- Re: Access 2003 Error: 3218 Could not update; currently locked
- From: Tony Toews [MVP]
- Re: Access 2003 Error: 3218 Could not update; currently locked
- From: stmedlin
- Re: Access 2003 Error: 3218 Could not update; currently locked
- From: Salad
- Re: Access 2003 Error: 3218 Could not update; currently locked
- From: stuart
- Access 2003 Error: 3218 Could not update; currently locked
- Prev by Date: Run app from intranet
- Next by Date: Re: Create a relationship in code
- Previous by thread: Re: Access 2003 Error: 3218 Could not update; currently locked
- Next by thread: Re: Access 2003 Error: 3218 Could not update; currently locked
- Index(es):
Loading