Copy value of textbox from subform

Sunnray

Registered User.
Local time
Today, 15:40
Joined
Jul 7, 2010
Messages
27
I'm unable to Google an answer to this question.

I have a form with a subform. I wish to use this subform by multiple forms. I want a textbox to equal a textbox from the subform. On a button click event I wish to move the value. This is what I found so far.

Private Sub btnFetchInfo_Click()
txtSIN = Me.frmEmployeesPermanent.Form.txtSIN
End Sub

This doesn't work. The textbox is not an option after Form.
Other forums have ! instead of periods.
Other threads have the button on the subform but where I wish to use this subform in multiple forms I don't think its an option.
 
How about:

Private Sub btnFetchInfo_Click()
txtSIN = Me.frmEmployeesPermanent.Form!Me.txtSIN
End Sub

JR
 
I get run-time error '2465': Application can't find the field 'Me' referred to in your expression. I removed the Me and it works. Thanks for the help.

Private Sub btnFetchInfo_Click()
Me.txtSIN = Me.frmEmployeesPermanent.Form!txtSIN
End Sub
 

Users who are viewing this thread

Back
Top Bottom