My first time trying to loop through a Subform to grab a value. I would like to call the ID value in the row I click. My first time trying this as I usually use the Listboxes click event to call a value. is this possible on a subform? to click a row and call it's ID value already present in the row?
What I have thusfar but it only loops through all the rows and returns all values for ID. Anyway to grab the ID for just the row the user has clicked?
Expand|Select|Wrap|Line Numbers
- Dim MyValue As String
- Dim rs As Recordset
- Set rs = Forms![ProjectForm]!Plan_Update.Form.RecordsetClone
- If Not rs.EOF Then rs.MoveFirst
- While Not rs.EOF
- MyValue = rs!ID
- MsgBox MyValue
- rs.MoveNext
- Wend
Thanks,
Paul
The subform is datasheet view.