Tags: access, code, control, database, form, ive, microsoft, mysql, oracle, parent, refer, sql, subform, subformsvb, subject, syntax

Refer to main form control from subform

On Database » Microsoft Access

1,207 words with 2 Comments; publish: Mon, 26 May 2008 11:22:00 GMT; (25045.90, « »)

Hi All,

The subject about says it all. What is the syntax used in subform's

VB code to refer to a control on its "parent" form? I've had it, but I

sure can't find it.

Thanks, Max

All Comments

Leave a comment...

  • 2 Comments
    • The syntax is

      Forms!mainFormName!controlName

      Hope This Helps

      Gerald Stanley MCSD

      >--Original Message--

      >Hi All,

      > The subject about says it all. What is the syntax

      used in subform's

      >VB code to refer to a control on its "parent" form? I've

      had it, but I

      >sure can't find it.

      >Thanks, Max

      >.

      >

      #1; Mon, 26 May 2008 11:23:00 GMT
    • Dear Max,

      Will it be as simple as:

      Private Sub Object_Event()

      Me.Parent.Controls("Name").PropertyToUse etc.

      End Sub

      Mvg, Frans

      "Max Moor" <maxmoor.ms-access.todaysummary.com.remove_hotmail.com> wrote in message

      news:Xns94C38BACC8587maxmoorhotmailcom.ms-access.todaysummary.com.207.46.248. 16...

      > Hi All,

      > The subject about says it all. What is the syntax used in subform's

      > VB code to refer to a control on its "parent" form? I've had it, but I

      > sure can't find it.

      > Thanks, Max

      #2; Mon, 26 May 2008 11:24:00 GMT