G
Guest
Access 2K3 ADP with SQL Server 2000
When refreshing a subform, the re-direct to original record focus is limited
to small recordsets. The original record can be found in the RecordSetClone
and the Bookmark recovered. However, if the record set is too large, the
"Me.Bookmark = rs.Bookmark" code does not work if the target record is too
far down the list. In a main form, I can use "DoCmd.GotoRecord" to send
focus to the end of the recordset and then the set bookmark code functions
correctly. However, in a subform, the form name cannot be passed to the
DoCmd.GotoRecord as an argument, since the subform doesn't appear in the
Forms collection - that line of code errors.
I suspect it is due to the fact that Access retrieves the first batch of
records and then continues fetching keys only until required to move through
the recordset - the records haven't been physically "fetched" at the point I
need to redirect the focus, so the set Bookmark command doesn't function. It
doesn't error either, so I can't tell that the code has failed and then loop
until it doesn't fail. Anyone know a work around for this problem?
Keithr
When refreshing a subform, the re-direct to original record focus is limited
to small recordsets. The original record can be found in the RecordSetClone
and the Bookmark recovered. However, if the record set is too large, the
"Me.Bookmark = rs.Bookmark" code does not work if the target record is too
far down the list. In a main form, I can use "DoCmd.GotoRecord" to send
focus to the end of the recordset and then the set bookmark code functions
correctly. However, in a subform, the form name cannot be passed to the
DoCmd.GotoRecord as an argument, since the subform doesn't appear in the
Forms collection - that line of code errors.
I suspect it is due to the fact that Access retrieves the first batch of
records and then continues fetching keys only until required to move through
the recordset - the records haven't been physically "fetched" at the point I
need to redirect the focus, so the set Bookmark command doesn't function. It
doesn't error either, so I can't tell that the code has failed and then loop
until it doesn't fail. Anyone know a work around for this problem?
Keithr