Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Leuven, Vlaanderen, Belgium
    Posts
    322
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Cascading subform combobox : can't get source OK (97)

    Dear members of the board,

    I 'm having trouble with cascading combo boxes in a subform (frmEvaluaties, subform named "fsubEvaluaties" in frmMJPs). I have a second combobox (cboStandaardzinnen) based on a query (tlkpStandaardzinnen) with a field criterium referring to the first combobox (cboIDcriterium). Probably I use wrong addressing of the subform control, but I can't find out how (probably some detail I overlook...)

    The query SQL is:
    SELECT tlkpStandaardzinnen.*
    FROM tlkpStandaardzinnen
    WHERE (((tlkpStandaardzinnen.sz_Criterium)=PARAMETER));

    With PARAMETER = [Forms]![frmEvaluaties]![cboIDcriterium]
    it works OK when opening the subform as a form.

    When using frmEvaluaties as a subform
    = [Forms]![frmMJPs]![fsubEvaluaties]![form]![cboIDcriterium]
    it won't work.

    I've included it as attachment.
    Can anyone see what I'm doing wrong?
    TIA!
    Hasse

    [Forms]![frmMJPs]![fsubEvaluaties]![form]![cboIDcriterium]
    Attached Files Attached Files

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Cascading subform combobox : can't get source OK (97)

    When addressing a control on a subform, you have to do it via the name of the subform control that sits on the mainform. The format is: [Forms]![frmMJPs].form![cboIDcriterium]

    Notice that the actual name of the subform is not used at all.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Cascading subform combobox : can't get source OK (97)

    You must use either<pre>[Forms]![frmMJPs]![fsubEvaluaties]![cboIDcriterium]</pre>

    or<pre>[Forms]![frmMJPs]![fsubEvaluaties]![form].[cboIDcriterium]</pre>

    The ! is used for controls, not for properties. Form is a property of the subform, not a control.

  4. #4
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Leuven, Vlaanderen, Belgium
    Posts
    322
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Re: Cascading subform combobox : can't get source OK (97)

    Thanks! It works!

Posting Permissions

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