Full Version: reference a row in continuous form
UtterAccess Forums > Microsoft® Access > Access Forms
How can I reference a particular row in a continuous form? is there something like 'rownum'?
Re: is there something like 'rownum'?
No. No such thing. This situation is most commonly handled by using the form's RecordsetClone property.
Assuming you want to navigate to a particular row based on the value of a key field, you would do so
with code similar to the following:
Dim strCriteria As String
im rst as DAO Recordset  [color="green"]'Must be DAO; No RecordsetClone in ADO  [/color]
   strCriteria = "[MyField]=1"
   Set rst = Me.RecordsetClone
   With rst
      .Find strCriteria
      If Not .EOF Then
         Me.Bookmark = .Bookmark
   End With
   If Not rst Is Nothing Then rst.Close
   Set rst = Nothing
If you are trying to refer to a row in the continuous form for use elsewhere you have to search for a unique field in the record you are looking at, such as the primary key.
one of the things I would like to do is change a value of a field in the continuous form- which is actually a subform ( without clicking on that form), but I have no unique value to reference, I would have the need to change the 2nd row showing or maybe the 5th - any number from 1 to 20 ( number of rows shown) and there are apx 4500 records that scroll through that continuous subform
is there a way to do that???
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.