Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    Kansas, USA
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    refer to a subform in VBS (A2000)

    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?

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: refer to a subform in VBS (A2000)

    Gary,
    Use :
    Me.NameOfSubForm.From.RecordSource = "NameOfSource"
    Francois

  3. #3
    Star Lounger
    Join Date
    Jan 2001
    Location
    Kansas, USA
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: refer to a subform in VBS (A2000)

    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.

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: refer to a subform in VBS (A2000)

    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.
    Francois

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •