Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Location
    Edmonton, Canada
    Posts
    72

    Unanswered: Continuous SubForm Only Returns 1 Record

    I have a Default View=Single Form, with a tab control with various sub forms with Default View = Continuous Forms.

    Some of these sub forms are acting strange, like the combo boxes will reset to blank after update, and one form only returns one record, but when I run the subform outside of the parent form, it works properly.

    Any leads/hot tips?

    Thanks,
    Carl

  2. #2
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372

    Hello Carl!

    AFTER UPDATE - use Vertical Scroll Bar.
    Try to enlarge your subforms (vertically).

  3. #3
    Join Date
    Jul 2004
    Location
    Edmonton, Canada
    Posts
    72
    I have the form stretched out to show about 20 records. THe strange thing is, I had a query that I used to construct the form, then I set its recordsource to nothing to speed loading of the form, grab the values from a couple of combo boxes and set the recordsource at runtime.

    When I select the 1st picklist, the vertical scroll bar dispappears.

    I also changed the recordsource for the host form. I was able to get things working by deleteing the offending objects and importing them from an old version, and making some of the changes.

    I even tried basing the form on a query and set the qd.sql = sql instead of the recordsource = sql. Nothing worked, the form would work fine on its own, but start misbehaving when I placed it in the host form.

    I was just wondering if this was a known issue.

    Thanks,
    Carl

  4. #4
    Join Date
    Oct 2004
    Location
    Oxfordshire, UK
    Posts
    89
    If you set the RecordSource of either the Parent Form or subForm Form at run-time Access will assign values to the LinkChildFields, LinkParentFields properties of the subForm control automatically. This doesn't always work as you'd expect with Fields other than the ones you would have chosen being assigned to the properties.

    If this is your problem record the values and reassign them after you change the RecordSource vis:

    Dim strLinkChildFields
    Dim strLinkParentFields

    strLinkChildFields = subForm.LinkChildFields
    strLinkParentFields = subForm.LinkParentFields
    Form.RecordSource= strSQL
    subForm.LinkChildFields = strLinkChildFields
    subForm.LinkParentFields = strLinkParentFields

    All The Best


    Ian

  5. #5
    Join Date
    Jul 2004
    Location
    Edmonton, Canada
    Posts
    72
    Now we're getting somewhere, that 'splains everything I think. I would also get combo boxes resetting themselves afterUpdate, forms promting me to save, when i didn't recall changing them. And I do make it a habit of saving forms in runtime, even when they're embedded in a parent form. I will watch for the behaviour, and implement the fix.

    Thanks so very much,
    Carl

Posting Permissions

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