Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Ephrata, Washington, USA
    Posts
    683
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sub-Sub Form (97 Sr2)

    Can you create a sub-form to a sub-form? Actually, I did, but I can't update info on the sub-sub form.. .it returns an error message "You can't assign a value to this object: The object may be a control on a read-only form or it may be on a form that is open in Design view."

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Sub-Sub Form (97 Sr2)

    Yes you can create sub-forms within sub-forms, as long as the outer sub-form is not a continuous form.

    So you error is caused by something else. Maybe the data is coming from a non-updatable query? Open the query itself and see if you can change any of the data.
    Regards
    John



  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Ephrata, Washington, USA
    Posts
    683
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sub-Sub Form (97 Sr2)

    I can open each form independently and update records. I can update records in the query for either form. I only get the error when I try to update the sub-sub form through the sub form.

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Sub-Sub Form (97 Sr2)

    Post it and I'm sure someone will help solve the problem.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Ephrata, Washington, USA
    Posts
    683
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sub-Sub Form (97 Sr2)

    It's the same db you helped me with earlier last week Pat. Do you still have a copy of it? I made a form from the ConditionUse table and then dragged that onto the DataEntry form (tab Condition Report). I deleted the UseId from the Condition Report. I can enter data in the ConditionUse form and in the ConditionReport form, but not when I have the ConditionUse form as a subform on the Condition Report. You must be sick of hearing about this db... almost as sick as I am at messing with it.
    I can zip it and would gladly email it to someone else who might be willing to look at it. I don't mean to glom onto you alone Pat.

  6. #6
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Sub-Sub Form (97 Sr2)

    Not at all, email it and I'll have a look at it.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Ephrata, Washington, USA
    Posts
    683
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sub-Sub Form (97 Sr2)

    I just noticed, Pat, that the subsub form DOES update to the base table. The error message seems to be bogus. But I'll email it to you anyway to look at in case you see some way to fix the error.. Thanks again.

  8. #8
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Sub-Sub Form (97 Sr2)

    I'll leave this to one of the big guns.
    From what I can see it's objecting to the combo box on the bound control, but then I'm not sure. <img src=/S/frown.gif border=0 alt=frown width=15 height=15>
    Sorry about that.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  9. #9
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Ephrata, Washington, USA
    Posts
    683
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sub-Sub Form (97 Sr2)

    Thanks for trying, Pat. I appreciate the effort.

  10. #10
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Ephrata, Washington, USA
    Posts
    683
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sub-Sub Form (97 Sr2)

    I still haven't figured this out, but I have two forms. Each works fine alone. Each updates to the proper table when data is entered in the standalone form. But, when I drag one form into another to create a subform, then the sub-sub form can't be updated - and yet it is. It gives an error message saying "You can't assign a value to this object." BUT, if I just fill in the fields and ignore the message (press OK), the data IS written to the base table. HOWEVER, when I close the form and go back in, the data does not show on the subform (although it IS on the base table). So, does this ring a bell with anyone?

  11. #11
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Sub-Sub Form (97 Sr2)

    From what I saw Melanie, it seems that UseID ends up as zero in one of the tables, yet UseID is the link between the forms.
    Check the tables and you will see what I mean.
    Something I have found is that UseID is an autonumber field in the sub-subform, so the subform record could never get a valid UseID (currently it is zero when you add a record in the sub-subform).
    There is also no primary keys in either of these two tables.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

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

    Re: Sub-Sub Form (97 Sr2)

    If you would like others to help/comment, it would be useful if you can post the database as an attachment:
    1. <LI>Make a copy of your database and use that in the following steps.
      <LI>Remove superfluous database objects - keep only those relevant to the problem.
      <LI>Delete most of the records - keep just enough to demonstrate the problem.
      <LI>Modify or delete sensitive data.
      <LI>Compact the database (Tools/Database utilities).
      <LI>Zip the database (use=ing WinZip). The zip file should be < 100 KB.
      <LI>Attach the WinZip file to a post.
      Note: previewing a post empties the "Attach a file" box!

  13. #13
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Sub-Sub Form (97 Sr2)

    I haven't seen your database, but I suspect that somewhere you are trying to assign a value to an auto-number field, which you are not allowed to do. In answer to your original question about subform nesting, we do it quite regularly at least 3 deep (form, subform, subform) so that isn't a limitation.
    Wendell

  14. #14
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Sub-Sub Form (97 Sr2)

    I don't expect properly linked sub-forms to work properly as standalone forms. Usually (for me anyway) a sub-form has hidden foreign key (that is the linking field) that is filled in automatically when used as a subform. Used as a standalone for this cannot be filled in.
    Review the structure- 3 tables each with a primary key defined. Each of the subforms needs to be bound to a table that has a foreign key to the table of the parent form.
    Regards
    John



  15. #15
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Ephrata, Washington, USA
    Posts
    683
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sub-Sub Form (97 Sr2)

    Ok. I have done as you suggested and stripped everything that doesn't relate to my problem. Thanks for the help!
    Attached Files Attached Files

Page 1 of 2 12 LastLast

Posting Permissions

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