In Access 2000, I have a form with a subform that is in Datasheet layout. Is there a way to retrieve a value that is on the first or previous row of the subform? The code will be written in the subform.
Assuming you are on one row and need to obtain the value on a previous row, you may use the RecordsetClone property. This allows for navigation to another row without affecting the current row of the form. Sample Code snippet:
Public Sub RClone()
Dim rstClone As DAO.Recordset
Dim frm As Form
Set frm = Me
Set rstClone = frm.RecordsetClone
With rstClone
.MovePrevious 'Code for obtaining value here
End With
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.