Getting the name of the main form

M

Manfred 1st

It is rather easy to get the name of the subform from the main form since it is recorded in "SourceObject". But what is the correct way of determining the name of the main form from the subform (with other words: To write data back from subform to main form on events in subform). This is important since my subform can be used by more than just one main form and I must be able to write values back to the current main form. But which form...??

Thank you for your hel

Manfred 1st
 
S

Steve Schapel

Manfred,

Me.Parent.Name will give you the name of the main form. You can refer
to controls on the main form by Me.Parent!ControlName
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top