[AccessD] You Canceled the Previous Operation

Gustav Brock Gustav at cactus.dk
Wed Sep 26 11:44:52 CDT 2007


Hi Rocky

Then, I guess, you perform some operation just ahead of looking up the bookmark - like an afterupdate event following the choice in the Listbox.

/gustav

>>> rockysmolin at bchacc.com 26-09-2007 18:06 >>>
Gustav:

I added DIM rst as Recordset because rst was undefined and changed  rst =
Me.RecordsetClone to Set rst = Me.RecordsetClone.

Hope that's right.

Anyway, I still get the error on the Me.Bookmark = rst.Bookmark.

Again, if I use a breakpoint and step through the code, it works.

Thanks and regards,

Rocky





 	
	

-----Original Message-----
From: accessd-bounces at databaseadvisors.com 
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Wednesday, September 26, 2007 8:23 AM
To: accessd at databaseadvisors.com 
Subject: Re: [AccessD] You Canceled the Previous Operation

Hi Rocky

Try to hold the Recordset:

    rst = Me.RecordsetClone
    rst.FindFirst "PersonID = " & Me.lstShortList.Column(0) 
    If rst.NoMatch = False Then
      Me.Bookmark = rst.Bookmark
    End If
    rst.Close
    
/gustav


>>> rockysmolin at bchacc.com 26-09-2007 17:13 >>>
Dear List:
 
Does anyone know why the code:
 
    Me.RecordsetClone.FindFirst "PersonID = " & Me.lstShortList.Column(0)
    Me.Bookmark = Me.RecordsetClone.Bookmark

generates an error 2001 - You Canceled the Previous Operation?
 
The value in Me.lstShortList.Column(0) is a valid PersonID.  It happens on
the second line.
 
MTIA
 
Rocky





More information about the AccessD mailing list