Sorry for something which should be very basic, but I'm stumped by the following problem :
I want to loop through a form and extract one field at time per record found.
So I wrote :
But when I test this, Exitidx returns always the first value even though I loop through the appropriate number of times.
Can anyone please point out the glaring mistake I know I'm making?.
I want to loop through a form and extract one field at time per record found.
So I wrote :
Code:
Dim rst as recordset
Dim Xnb, Cpt, Exitidx as long
set rst = me.recordsetclone
Xnb = rst.recordsetcount
if Xnb <> 0 then
rst.movefirst
For Cpt = 1 to Xnb
Exitidx = me.[Idx_ctrl]
'some code is supposed to be tested here, right now I put a msgbox to test the return Exitidx value
rst.movenext
Next
End If
But when I test this, Exitidx returns always the first value even though I loop through the appropriate number of times.
Can anyone please point out the glaring mistake I know I'm making?.