• refer to a subform in VBS (A2000)

    Author
    Topic
    #359712

    I want to set the Record Source property on a subform, but I haven’t figured out how to refer to the subform. I’m setting the Record Source on the main form with this code: Me.RecordSource = “qryaudit0000k1” but how do I refer to the subform?

    Viewing 0 reply threads
    Author
    Replies
    • #539945

      Gary,
      Use :
      Me.NameOfSubForm.From.RecordSource = “NameOfSource”

      • #539961

        When I use this, Me.auditsf.Form.RecordSource = “qryauditdetail0000K1” I get this error, Compile error: Method or data member not found. I still need further enlightenment.

        • #539962

          Gary,
          Are you sure that ‘auditsf’ is the name of the subform control ?
          In the properties of the subform, tab Others, Name ?
          If you use the name that you find in the database windows and the name of the subform control is different, you get an compile error.

    Viewing 0 reply threads
    Reply To: refer to a subform in VBS (A2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: