By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,327 Members | 1,791 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,327 IT Pros & Developers. It's quick & easy.

Form - Subform

P: n/a
I have a form which contains a subform (in datasheet). When I click on
a row in the subform (a button is placed there), I want the parent
form's record display what i clicked in that subform. (Parent and
subform are linked with a ID_SHIP).

Anybody, Anywhere, Anyhow, Anyway, Anytime TX
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Assuming that the main form has a Label control named "lblShowSub" to show
the result, and the subform has a field named "ID" that you want to display
there, the Click event procedure for your command button would be:

Private Sub cmdShow_Click()
Me.Parent!lblShowSub.Caption = "ID in subform is " & Me.ID
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Peter D" <da*********@pandora.be> wrote in message
news:2f**************************@posting.google.c om...
I have a form which contains a subform (in datasheet). When I click on
a row in the subform (a button is placed there), I want the parent
form's record display what i clicked in that subform. (Parent and
subform are linked with a ID_SHIP).

Anybody, Anywhere, Anyhow, Anyway, Anytime TX

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.