[AccessD] Error 2468 - You can'tcarryoutthisactionatthepresenttime.

Charlotte Foust cfoust at infostatsystems.com
Wed Jan 28 19:16:55 CST 2004


Yep, the command button wizard still writes Access 95 code.  Cute, huh?

Is there anything else on your form that has a connection to the same
table the parent form is based on?  If not, then you need to make sure
there is a current record before you try deleting again.  You might
stick some debug.print code in there to print the current Me.fldPOPrefix
or return the Me.NewRecord flag to see where you are.  If you wind up on
a new record by deleting the last record in the recordset, then you'll
get an error if you try to go to a new record.  If you're on the new
record when you try to delete, you'll get an error because there is no
current record.   If you have started to create a new record, you can't
delete it because it isn't saved, and you can't go to NewRecord for the
same reason.  Any way you look at it, it pays to make sure you know
where you are before you try to do anything. 

Charlotte Foust

-----Original Message-----
From: Rocky Smolin - Beach Access Software [mailto:bchacc at san.rr.com] 
Sent: Wednesday, January 28, 2004 5:07 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Error 2468 - You
can'tcarryoutthisactionatthepresenttime.


Trying to delete from the parent form.  A parent record that has no
child records.

For delete what should I use: DoCmd.RunCommand acDeleteRecord?

That code came from the command button wizard.

Rocky

----- Original Message ----- 
From: "Charlotte Foust" <cfoust at infostatsystems.com>
To: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
Sent: Wednesday, January 28, 2004 4:22 PM
Subject: RE: [AccessD] Error 2468 - You can't
carryoutthisactionatthepresenttime.


> Ack!  Lose that old A95 code, please!  I can't even read it any more. 
> Comment out the SetWarnings False and see what Access tells you about 
> the operation.
>
> HOY!  I just noticed that you appear to be running this from the 
> parent form.  Which form are you trying to delete a record from?
>
> Charlotte Foust
>
> -----Original Message-----
> From: Rocky Smolin - Beach Access Software [mailto:bchacc at san.rr.com]
> Sent: Wednesday, January 28, 2004 4:18 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Error 2468 - You can't carry 
> outthisactionatthepresenttime.
>
>
> Rats.  No soap.  Got the error on the second delete after adding the 
> dbengineidle and the subfrm requery like this:
>
>
>     DoCmd.SetWarnings False
>     DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
>     DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
>     DoCmd.SetWarnings True
>
>     DBEngine.Idle dbRefreshCache
>
>     Me.Requery
>     Me!subfrmPODetail.Requery
>
> Any other ideas?
>
> Thanks and regards,
>
> Rocky
>
> ----- Original Message -----
> From: "Charlotte Foust" <cfoust at infostatsystems.com>
> To: "Access Developers discussion and problem solving"
> <accessd at databaseadvisors.com>
> Sent: Wednesday, January 28, 2004 3:47 PM
> Subject: RE: [AccessD] Error 2468 - You can't carry out
> thisactionatthepresenttime.
>
>
> > Rocky,
> >
> > I suspect you're running into an issue I've seen in somewhat similar

> > circumstances, where the deletion didn't actually seem to get 
> > processed until I requeried the subform.  Have you tried a 
> > DBEngine.Idle dbRefreshCache after the deletion?
> >
> > Charlotte Foust
> >
> > -----Original Message-----
> > From: Rocky Smolin - Beach Access Software 
> > [mailto:bchacc at san.rr.com]
> > Sent: Wednesday, January 28, 2004 2:13 PM
> > To: Access Developers discussion and problem solving
> > Subject: Re: [AccessD] Error 2468 - You can't carry out
> > thisactionatthepresent time.
> >
> >
> > Charlotte:
> >
> > Further to my reply, I found that when I did a delete then, before I

> > did anything else, I went and looked in the tblPOHeader and the 
> > record
>
> > was still there.  For some reason it's not completing the delete and

> > that's why I think it's telling me that I can't make any moves at 
> > this
>
> > time.
> >
> > Rocky
> >
> > ----- Original Message -----
> > From: "Charlotte Foust" <cfoust at infostatsystems.com>
> > To: "Access Developers discussion and problem solving" 
> > <accessd at databaseadvisors.com>
> > Sent: Wednesday, January 28, 2004 1:20 PM
> > Subject: RE: [AccessD] Error 2468 - You can't carry out this 
> > actionatthepresent time.
> >
> >
> > > It sounds like you may have the parent and child forms linked to 
> > > the
>
> > > same dataset.  Do you?
> > >
> > > Charlotte Foust
> > >
> > > -----Original Message-----
> > > From: Rocky Smolin - Beach Access Software 
> > > [mailto:bchacc at san.rr.com]
> > > Sent: Wednesday, January 28, 2004 1:04 PM
> > > To: Access Developers discussion and problem solving
> > > Subject: Re: [AccessD] Error 2468 - You can't carry out this 
> > > action atthepresent time.
> > >
> > >
> > > I'm getting closer.  I deleted the sub-form that on the second tab

> > > of the tab form and the two deletes worked.
> > >
> > > It has something to do with a sub form on a tab.  Any clues, 
> > > anybody?
> > >
> > > Rocky
> > >
> > > ----- Original Message -----
> > > From: "Joe K Anderson" <ja at alldatacorp.com>
> > > To: "Rocky Smolin - Beach Access Software" <bchacc at san.rr.com>; 
> > > <accessd at databaseadvisors.com>
> > > Cc: "Wayne Warren Angelucci" <wayne.warren at adelphia.net>; "Gordon 
> > > Bennett" <gbennett at webdatacorporation.com>; "Barry Hynum" 
> > > <bhynum at cox.net>; "Dixon Foss" <dixon at fossware.net>; "Mark 
> > > Krisburg"
>
> > > <krisburg at opsoft.com>
> > > Sent: Wednesday, January 28, 2004 11:44 AM
> > > Subject: Re: [AccessD] Error 2468 - You can't carry out this 
> > > action at thepresent time.
> > >
> > >
> > > You may need to do a Requery between deletes?
> > >
> > > joe
> > >   ----- Original Message ----- 
> > >   From: Rocky Smolin - Beach Access Software
> > >   To: Access Developers discussion and problem solving
> > >   Cc: Wayne Warren Angelucci ; Mark Krisburg ; Joe Anderson ; 
> > > Gordon
>
> > > Bennett ; Dixon Foss ; Bob Heygood ; Barry Hynum
> > >   Sent: 01-28-2004 11:34
> > >   Subject: Re: [AccessD] Error 2468 - You can't carry out this 
> > > action at the present time.
> > >
> > >
> > >   Randall:
> > >
> > >   Tried this experiment just to get the DAO recordset out of the 
> > > way.
> > I
> > >   deleted all references to it.
> > >
> > >   Then I replaced:
> > >
> > >       'DoCmd.SetWarnings False
> > >       'DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
> > >       'DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
> > >       'DoCmd.SetWarnings True
> > >
> > >   with
> > >
> > >   DoCmd.RunCommand acCmdDelete
> > >
> > >   I selected a record and ran that code which does the delete.  
> > > Then
>
> > > before
> > >   trying to delete the second record, I checked the table and the 
> > > record was
> > >   still there!
> > >
> > >   So the delete (and probably other operations) are not completing

> > > for
> >
> > > some
> > >   reason.
> > >
> > >   Pluse, when I get the error, I have to use the task manager to 
> > > clear
> >
> > > access.
> > >   It won't quit, cant close any forms, etc.
> > >
> > >   Any ideas?
> > >
> > >   Many thanks in advance and regards,
> > >
> > >   is
> > >
> > >   ----- Original Message ----- 
> > >   From: "Randall Anthony" <ranthony at wrsystems.com>
> > >   To: "'Access Developers discussion and problem solving'"
> > >   <accessd at databaseadvisors.com>
> > >   Sent: Wednesday, January 28, 2004 10:31 AM
> > >   Subject: RE: [AccessD] Error 2468 - You can't carry out this 
> > > action at the
> > >   present time.
> > >
> > >
> > >   > Right off the top of my head, it has to do with the movefirst,

> > > movelast.
> > >   I
> > >   > ran into this when converting A97 to A2K.  Code worked in A97,

> > > not
> >
> > > A2K and
> > >   > M$ said this was designed behavior.  I'll try to find the
> article.
> > >   >
> > >   > -----Original Message-----
> > >   > From: Rocky Smolin - Beach Access Software 
> > > [mailto:bchacc at san.rr.com]
> > >   > Sent: Wednesday, January 28, 2004 1:07 PM
> > >   > 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
> > >   > _______________________________________________
> > >   > AccessD mailing list
> > >   > AccessD at databaseadvisors.com
> > >   > http://databaseadvisors.com/mailman/listinfo/accessd
> > >   > Website: http://www.databaseadvisors.com
> > >   >
> > > _______________________________________________
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com 
> > > http://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com
> > >
> > > _______________________________________________
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com 
> > > http://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com 
> > > _______________________________________________
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com 
> > > http://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com
> >
> > _______________________________________________
> > AccessD mailing list
> > AccessD at databaseadvisors.com 
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com 
> > _______________________________________________
> > AccessD mailing list
> > AccessD at databaseadvisors.com 
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>

_______________________________________________
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