Update form from subform

Kyriakos

Registered User.
Local time
Today, 20:41
Joined
Feb 18, 2006
Messages
42
Hey to everyone. I have a main form and based on the selection I make from a combo box a subform opens. On the subform I have another combo box and I want the new selection to be displayed on the main form as well.
And I don't know how...Does this has anything to do with the relationships? Can anybody help?
Hope I am clear enough
 
From VBA you can easily refer to a control on a subform. The syntax is:

Me.Subform.Form!ControlName

So if you have a subform named sfrmInvoice and a control named DueDate, the syntax would be:

Me.sfrmInvoice.Form!DueDate

You can retrieve the value from your subform control in VBA or in the control on the main form that would contain the information. Just remember to remove the "Me" keyword if you are not using Visual Basic for Applications.
 

Users who are viewing this thread

Back
Top Bottom