M
Michael Schwab
Hi everybody,
(I hope that I can explain this well)
I have a continous subform that holds more records that it can display.
After update of a record I have to refresh the form, which by default puts
the focus onto the first record. To stop this (and to stay in the same
record) I am using this routine:
Public Sub StayAtRecord(subForm As Control, strField As String, lngPK As
Long)
On Error GoTo HandleError
Dim rst As New ADODB.Recordset
Set rst = subForm.Form.Recordset.Clone
rst.Find (strField & "=") & lngPK
uForm.Form.Bookmark = rst.Bookmark
rst.Close
ExitHere:
Set rst = Nothing
Exit Sub
HandleError:
Resume ExitHere
End Sub
, which works fine, BUT it positions the record at the top of the subform
control. How can I get the subform not to scroll (and leave the position of
the record where it is)????
Thanks, Michael
(I hope that I can explain this well)
I have a continous subform that holds more records that it can display.
After update of a record I have to refresh the form, which by default puts
the focus onto the first record. To stop this (and to stay in the same
record) I am using this routine:
Public Sub StayAtRecord(subForm As Control, strField As String, lngPK As
Long)
On Error GoTo HandleError
Dim rst As New ADODB.Recordset
Set rst = subForm.Form.Recordset.Clone
rst.Find (strField & "=") & lngPK
uForm.Form.Bookmark = rst.Bookmark
rst.Close
ExitHere:
Set rst = Nothing
Exit Sub
HandleError:
Resume ExitHere
End Sub
, which works fine, BUT it positions the record at the top of the subform
control. How can I get the subform not to scroll (and leave the position of
the record where it is)????
Thanks, Michael