Access97
I hope someone out there can help. This is driving me crazy.
Basically, I am trying to recreate VBA's built in navigation feature
(The one that allows you to move first, next, previous, and last and
also tells you that you are on Record # or [Total # of Records]. The
navigation part was easy. My problem is determing the what record I
am on and the total number of records.
I put the following code into the my subforms on Current event:
'------------------------
dim RS_Temp as Recordset
set RS_Temp = me.recordsetclone
if not (rs.bof and rs.eof)then
me!txtAbsolutePosition = RS_Temp.AbsolutePosition + 1
RS_Temp.movelast
me!txtRecordCount = RS_Temp.RecordCount
end if
'-----------------------
The + 1 in the line "me!txtAbsolutePosition =
RS_Temp.AbsolutePosition + 1"
is because Absolute position is zero based.
The problem is that this code is never run because recordset clone
constantly returns an empty Recordset.
I have even tried putting the code in the MainForms on Current event,
also with no luck.
If I open the subform alone, the code seems to work fine. Does anyone
have a solution?
Thanks!!
Ryan