frimy
asked on
Access 2010
Hi Everybody!
The following code i have to loop thru the table in a form to add up all the size Qty's (20 sizes).
Is there a way to do same in a recordset to loop thru the same way? (e.i ctl.name and ctl)
If yes can you give me an example.
Thanks
For Each ctl In frm.Controls
If Left(ctl.Name, 2) = "SH" Then wQty = wQty + Nz(ctl)
Next ctl
The following code i have to loop thru the table in a form to add up all the size Qty's (20 sizes).
Is there a way to do same in a recordset to loop thru the same way? (e.i ctl.name and ctl)
If yes can you give me an example.
Thanks
For Each ctl In frm.Controls
If Left(ctl.Name, 2) = "SH" Then wQty = wQty + Nz(ctl)
Next ctl
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much
it works very good
it works very good
dim rs as dao.recordset, j as integer
set rs=currentdb.openrecordset
rs.edit
for j=0 to rs.fields.count-1
rs(rs(j).name)= wQty + nz(rs(j).value)
next