[AccessD] RecordsetClone and Bookmark

Asger Blond ab-mi at post3.tele.dk
Tue Feb 7 11:55:26 CST 2012


Thanks.

/ Asger

-----Oprindelig meddelelse-----
Fra: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] På vegne af jwcolby
Sendt: 7. februar 2012 16:38
Til: Access Developers discussion and problem solving
Emne: Re: [AccessD] RecordsetClone and Bookmark

The bookmark allows you to sync the recordset with the physical display without knowing the PKID. 
If you know the PKID then you r method works just fine.

John W. Colby
Colby Consulting

Reality is what refuses to go away
when you do not believe in it

On 2/7/2012 10:29 AM, Asger Blond wrote:
> Having a listbox on a form for navigation to a specific record I've always used RecordsetClone and Bookmark like this:
>
> Private Sub lstOrderID_AfterUpdate()
> 	Dim rst As DAO.Recordset
> 	Set rst = Me.RecordsetClone
> 	rst.FindFirst "OrderID = "&  Me.lstOrderID
> 	Me.Bookmark = rst.Bookmark
> End Sub
>
> Now I notice that the code apparently might as well be just:
>
> Private Sub lstOderID_AfterUpdate()
> 	Me.Recordset.FindFirst "OrderID = "&  Me.lstOrderID
> End Sub
>
> Can't remember the reason for using RecordsetClone and Bookmark in this case. Any suggestions?
>
> / Asger	
>
>

-- 
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