Re: Access 2003 Error: 3218 Could not update; currently locked



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.

.



Relevant Pages

  • Re: Access 2002 Runtime and Vista
    ... error message, "The Office System Pack cannot be installed on this ... Tony Toews, Microsoft Access MVP ...
    (microsoft.public.access.devtoolkits)
  • Re: Saving a form discards the digital certificate
    ... they get an error message ... We much prefer lengthy well written postings to short postings without ... significant amount of time researching some alternatives and actually ... Tony Toews, Microsoft Access MVP ...
    (microsoft.public.access.security)
  • Re: INSERT INTO Query Question
    ... query I get the following response: "Microsoft Access can't append all the ... records in the append query. ... the following error message as I attempt to run an append query: ... FROM [prospect list]; ...
    (microsoft.public.access.queries)
  • Sample code for the MS crypto API calls.
    ... I'm looking for some up to date sample code for the MS crypto API ... A few users have reported getting the error message. ... ByVal pszContainer As String, _ ... Tony Toews, Microsoft Access MVP ...
    (microsoft.public.vb.general.discussion)
  • Re: A real learners question!
    ... I have renamed everything without spaces but I still get the error message ... I currently get an error message saying "Microsoft Access can't find macro ... event of the details form. ...
    (microsoft.public.access.forms)