Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update subform field

Status
Not open for further replies.

machine08

Technical User
Dec 16, 2007
22
US
Hi all,

I have a frm_Main which contain another form: frm_SubForm.

When I in the subform I would like to get a value from the frm_Main and copy it into a frm_SubForm field. I'm having a hardtime doing this. Here's what I have so far:
Code:
Forms!frm_Main!frm_SubForm.Form.ItemToUpdate.value = Me.ID.Value
Would appreciate if someone could help me figure out what I'm doing wrong.

Thank you!
 
Like this ?
Forms!frm_Main!frm_SubForm.Form.ItemToUpdate.Value = Forms!frm_Main!ID.Value

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
machine08 said:
[blue]When [purple]I in the subform[/purple] I would like to get a value from the frm_Main . . .[/blue]
Code:
[blue]   Me!ItemToUpdate = Forms!frm_Main!ItemToGet[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
 
Howdy SeeThru . . .

Correct me if I'm wrong, but the [blue]parent of a control on a subform[/blue], is the subform! Giving:
Code:
[blue]   Me.Parent.Parent!ItemToGet[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
 
Hmmm..cant remember - I'd just try it to see what worked!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top