Results 1 to 9 of 9
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Subform Hell (A2k)

    This subject must have been visited many, many times but here we are again.

    Mainform
    Subform
    Sub-Subform (This is a sub of the sub)

    I am trying without avail to reference a field from the sub-subfor to the main.
    I've tried different variations to no avail !!
    The task is to populate an unbound on the main from fields from the sub-sub.

    =Forms[Main].[Sub].[SubSub]![Field}
    =Forms[Main]![Sub]![SubSub]![Field} ..................... etc etc

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

    Re: Subform Hell (A2k)

    In the first place, if you are on the main form, you don't need =[Forms]![Main]!... (the syntax =Forms[Main]!... is incorrect), you can use =[Sub]![Sub Sub]![Control]

    In the second place, you must use the name of the subform as a control on the main form; this is not necessarily the same as the name of the subform in the database window. To see the control name, open the main form in design view and click once on the subform to select it. Don't click on the subform a second time, for that would select something in the subform. The control name will be displayed in the object dropdown on the Formatting toolbar and in the title bar of the Properties window.
    Similarly, you must use the name of the sub-subform as a control on the subform; this need not be the same as the name of the sub-subform in the database window.

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Subform Hell (A2k)

    Hans

    I tried that in the many variations.
    With your suggestion, I still get #Name? in the unbound on the main.
    See the PNG attached , the unbound on the main "frmProgress" needs to be populated with OWN_NME from sbfProgressVeh

    sbfProgressVeh is a linked sub of sbfProgress

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

    Re: Subform Hell (A2k)

    Are you absolutely sure that you have used the control names instead of the names of the subforms in the database window? You mention sbfProgressVeh but the control source seems to refer to sbfProgressVehicle as far as I can see in the screenshot.

    If you can't make it work, could you create a blank new database and import only the main form and the two subforms into it, then compact, zip and attach it to a reply? No need to include tables, queries, etc.

  5. #5
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Subform Hell (A2k)

    Sorry Hans

    That was me being lazy with my typo.

    See attached.

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

    Re: Subform Hell (A2k)

    Try using sbfProgressVehicle instead of sbProgressVehicle in the control source of the text box (i.e. insert an f between sb and ProgressVehicle).

  7. #7
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Subform Hell (A2k)

    Still getting #name?

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

    Re: Subform Hell (A2k)

    I'm afraid I don't understand your setup. The main form is based on tblEst, the subform on tblProgress, and the sub-subform on tblEst again. Why do you need the sub-subform at all? You might as well include the info in the main form directly.

    Your subform is a datasheet form, and datasheets don't display subforms. If you turn the subform into a continuous form, the sub-subform will be displayed and the control on the main form should work. But, as mentioned, you could have put a control based on OWN_NME directly on the main form.

  9. #9
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Subform Hell (A2k)

    Hans

    You're dead right, seems I just complicated things !
    I totally forgot tblEst was under the main form.

    Thanks, I will start agin, Monday again Eh !! <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>

Posting Permissions

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