Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access Modules daovba ado > Click on a deta...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 1501 of 1609
Post > Topic >>

Click on a detail record field, reference the record?

by kevinwjameson@[EMAIL PROTECTED] Jun 26, 2008 at 10:38 AM

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
 




 2 Posts in Topic:
Click on a detail record field, reference the record?
kevinwjameson@[EMAIL PROT  2008-06-26 10:38:04 
Re: Click on a detail record field, reference the record?
Stefan Hoffmann <stefa  2008-06-26 20:03:42 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 9:26:49 CST 2008.