Access - Get subForm datasheet value of row

Oflores23

New member
Local time
Today, 12:16
Joined
Feb 27, 2015
Messages
9
I have a subform which is created with textbox and some command button in the top of the window, so this will simulate like a Datagrid.

http: // imgur.com/MpIpksT

This is how it looks my datagrid when it fills from a Query.

http: // imgur.com/kxAS8Ff

What I want is when I select a row from my subform, I want to Click the button "Cambiar", and get the value of the machine selected.

http: // imgur.com/LCEQlSI
 
My main form is zfrmMain, my subform is zfrmStatus, inside this subform, I have 3 textbox,

txt_machine_name, txt_status, txt_lastregister.

So if i'm in my MainForm, and I click in my subform row 2; then I click on my button that it's on my main form, how can I get the value.

private sub cmd_cambiar_click()
MSGBOX Me.zfrmStatus.txt_machine_name.value
end sub
 
Solution:

http //imgur.com/gikNKPc

I just write:

Referred from:
http //access.mvps.org/access/forms/frm0031.htm

MsgBox Me!zfrmStatus.Form!txt_machine_name.Value

and it brings the value from the selected row.

Thanks for the HelP!
 
No problem, and welcome to the site!
 

Users who are viewing this thread

Back
Top Bottom