Use Recordset in subform (1 Viewer)

amir0914

Registered User.
Local time
Yesterday, 20:42
Joined
May 21, 2018
Messages
151
Hi all, I wrote a simple code to prompt or alert name of each selected records, but it's not working :

Code:
Dim rst As Recordset

Set rst = Me.Child96.Form.RecordsetClone

rst.MoveFirst
With rst
     Do Until .EOF
     If .Fields("chk") = True Then
     zz = .Fields("t_name")
     MsgBox zz
     End If
    .MoveNext
     Loop
End With
Set rst = Nothing

Can some one tell me what's wrong in the code??
 

jdraw

Super Moderator
Staff member
Local time
Yesterday, 23:42
Joined
Jan 23, 2006
Messages
15,379
What are you trying to do in simple terms?
What exactly does this mean " it's not working"? Error number, description?
 

Gasman

Enthusiastic Amateur
Local time
Today, 04:42
Joined
Sep 21, 2011
Messages
14,231
Set a breakpoint and walk through the code with F8 in the debugger.?
 

Users who are viewing this thread

Top Bottom