VBA code example

Pat
5StarLounger
Posts: 1148
Joined: 08 Feb 2010, 21:27

VBA code example

Post by Pat »

I would like to know what the following command does:
Me.Bookmark = rs.LastModified

Does it set the forms current record to the rs.LastModified record?

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: VBA code example

Post by HansV »

This will only work if rs is (a clone of) the recordset of the form; one way of setting it is a line

Set rs = Me.RecordsetClone

earlier in the code. It will then indeed make the record that was last modified by the code the active record in the form.
Best wishes,
Hans

Pat
5StarLounger
Posts: 1148
Joined: 08 Feb 2010, 21:27

Re: VBA code example

Post by Pat »

Thank you, i wasn't sure about the RecordsetClone property.