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

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Cascading subform combobox : can’t get source OK (97)

    Author
    Topic
    #403182

    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]

    Viewing 2 reply threads
    Author
    Replies
    • #808793

      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.

    • #808794

      You must use either

      [Forms]![frmMJPs]![fsubEvaluaties]![cboIDcriterium]

      or

      [Forms]![frmMJPs]![fsubEvaluaties]![form].[cboIDcriterium]

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

    • #808795

      You must use either

      [Forms]![frmMJPs]![fsubEvaluaties]![cboIDcriterium]

      or

      [Forms]![frmMJPs]![fsubEvaluaties]![form].[cboIDcriterium]

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

    Viewing 2 reply threads
    Reply To: Reply #808794 in Cascading subform combobox : can’t get source OK (97)

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

    Your information:




    Cancel