Obtain record value from datasheet subform

maw230

somewhat competent
Local time
, 18:40
Joined
Dec 9, 2009
Messages
522
How can I obtain the value of a record from my subform in datasheet view?

Ideally I could double click in the "cell", for lack of a better word, and grab that value to pass through to another function.

On double click event? What then?

Edit: I suppose the user could select the row that the value is in as well. As long as I could then find the field I need from within the row. That might make things easier.

Edit 2: Sometimes I post before doing proper research. I've figured it out. Here is a quick example for anyone else. The below code references an unbound subform called "Main_AU" where the field I want is "Description". The MsgBox is used to confirm that the code is grabbing what I want it to.

Code:
Dim test As String
test = Main_AU!Description
MsgBox test
 
Last edited:
Thanks, Paul. I believe I posted this one prematurely. :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom