[AccessD] Error 2468 - You can't carry out this action at the present time.

Jim Lawrence (AccessD) accessd at shaw.ca
Wed Jan 28 20:08:05 CST 2004


Hi Rocky:

My suggestion and unfortunately I do not have the code at my finger tips.

1. Open a DAO recordset, selecting all the records to be removed, in dynamic
mode with optimistic lock set (dbOpenDynamic, dbOptimistic).
2. Turn error off and set error to 0. When looping through the recordset,
deleting/updating the content watch for an error number change...someone may
be in one the records and you will not be able to delete it...other errors
can (for the most part) be ignored.
3. Run requery and turn the errors on.

HTH
Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Rocky Smolin -
Beach Access Software
Sent: Wednesday, January 28, 2004 10:07 AM
To: AccessD at databaseadvisors.com
Subject: [AccessD] Error 2468 - You can't carry out this action at the
present time.


Dear List:

I am getting the following error message on a bound form:

Error 2468 - You can't carry out this action at the present time.

This form has a sub form linked to the main form by the main form's primary
key.  (Main form is P.O. Header, subform is P.O. Detail).

I get this error if I try to delete two records in a row.

    DoCmd.SetWarnings False
    DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
    DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
    DoCmd.SetWarnings True

I also get this error after I try to add a record.  The problem started
because I wanted to get the last PO in the file, add one to the PO number,
and put the prefix and the new PO number ito the new record:

    DoCmd.GoToRecord , , acNewRec

    'If rstPOHeader.RecordCount <> 0 Then
    '    rstPOHeader.MoveLast
    '    Me.fldPOPrefix = Nz(rstPOHeader!fldPOPrefix)
    '    If IsNumeric(rstPOHeader!fldPONumber) Then
    '        Me.fldPONumber = rstPOHeader!fldPONumber + 1
    '        fldPOOrderDate.SetFocus
    '    Else
    '        Me.fldPONumber.SetFocus
    '    End If
    'End If
    'If Nz(Me.fldPOPrefix) = "" And Nz(rstPOHeader!fldPOPrefix) = "" Then _
        Me.fldPOPrefix.SetFocus

Right now the code is commented out.  If I uncomment the two lines:

    '    rstPOHeader.MoveLast
    '    Me.fldPOPrefix = Nz(rstPOHeader!fldPOPrefix)

I get the error when I try to save:

    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

I checked the web and there is nothing.  Has anyone encountered this before?

Thanks and regards,

Rocky Smolin
Beach Access Software
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list