Reference Row in Subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, How do you check value of a control on each row of a subform. I know
the code below will validate if the first row has value of yes but what if I
wanted to check the third row.

Thanks

Don

If Forms!fMain!sfSubMain.Form.Field1= "Yes" then
'DO Something
end if
 
You would have to check the value of the third record, just as you would on
a standard form (one record at a time). If you want to do it with the mouse,
Stephen Lebans (www.lebans.com) has a solution on his web site that will
give you the value as the mouse goes over the control. Otherwise,

1) Move to that record on the form then check the value.

2) To not move the current record on the form, create a RecordsetClone of
the subform's recordset and move the Clone to the appropriate record and
check the value.
 
Back
Top