K
kevinwjameson
I click on a detail record field in a form, and want to reference
other fields in that same record. In the OnClick handler, I can easily
see the field text value, and the Me.CurrentRecord number, like so:
Private Sub Tset_Click()
' I can see the text of the cell I clicked on (tset) fine.
' I can reference the current record in the grid fine too. (it's
record 12)
MsgBox "Tset field value is " & Tset.Text & ", current detail
record is (" & Me.CurrentRecord & ")"
' now how do I reference other cells on the same grid row?
Dim rs As ADODB.Recordset
Set rs = Me.Recordset ' gives an error too
Set rs = Me.RecordsetClone ' gives a type mismatch error
'MsgBox "The LType field is " & rs!LType ' I don't get this far
End Sub
Any help would be appreciated. I have read about RecordSetClone
requires the use of DAO, but that is a whole other project for me to
learn about. Is there any easier way to reference a record row in a
detail grid on a form? Thanks
other fields in that same record. In the OnClick handler, I can easily
see the field text value, and the Me.CurrentRecord number, like so:
Private Sub Tset_Click()
' I can see the text of the cell I clicked on (tset) fine.
' I can reference the current record in the grid fine too. (it's
record 12)
MsgBox "Tset field value is " & Tset.Text & ", current detail
record is (" & Me.CurrentRecord & ")"
' now how do I reference other cells on the same grid row?
Dim rs As ADODB.Recordset
Set rs = Me.Recordset ' gives an error too
Set rs = Me.RecordsetClone ' gives a type mismatch error
'MsgBox "The LType field is " & rs!LType ' I don't get this far
End Sub
Any help would be appreciated. I have read about RecordSetClone
requires the use of DAO, but that is a whole other project for me to
learn about. Is there any easier way to reference a record row in a
detail grid on a form? Thanks