Results 1 to 6 of 6

Thread: Subforms (97)

  1. #1
    eLar
    Guest

    Subforms (97)

    Hi. I have been having a problem with a form I created. The main form tracks patient demographic information that is unlikely to change from visit to visit. If a user checks off that they came due to a certain complaint a subform appears, where the enter detailed information about that condition (for certain conditions of interest). Within that detailed information there are some measures that can have multiple entries, so on the subform I added additional subforms to capture that data. My problem is that when the user would enter data into the form it would capture the data into the demographic table and the main disease-specific table, but not the disease-specifc subtables. There was never an error message, just that the data was not recorded.

    I was able to fix this by removing the subforms from the main subform and leaving blank space on the main subform for them, but when it comes time to update this form's design I know it will be difficult.

    Does anyone have any advice on how to (or not to) embed subforms within subforms?

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Subforms (97)

    Hi Larry

    One of my pet hates is the use of subforms inside bound subforms! For one thing it tends to muddle up the screen. Have you thought of using popup forms? Another way is to have your subforms on the main form but switching the visibility on and off dependent on the info inputted?

    Just a couple of ideas, I hope they are useful
    Jerry

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

    Re: Subforms (97)

    Not sure why you had difficulty with nested subforms as we use them fairly regularly where you have 3-tiered information. An example might be where you have a person or organization who receives an invoice, and each invoice can have several line items. Doing that sort of thing requires an appropriate table design with the proper keys, and the lowest level subform needs to be linked to the appropriate field on the subform directly above the lowest level subform. I agree that the form design can get fairly cluttered with nested subforms, so we always use the mid-level subform in form mode rather than datasheet view, and often put the lowest level subform in form view as well. We also typically make the form flat rather than sunken and hide borders and such. Hope this helps.
    Wendell

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Subforms (97)

    Are you enforcing referential integrity between the disease-specific table and the subtables? If not, you're going to have to make sure the necessary foreign key gets inserted into the lowest level subform record. It sounds like this isn't happening. You should be getting error messages though, unless you have done something to suppress them. Is the deepest nested subform properly linked to its parent subform?
    Charlotte

  5. #5
    eLar
    Guest

    Re: Subforms (97)

    I've never used a popup form, but it sounds like it would not be appropriate in this situation. These subforms are linked to a "main" subform, whose visibility is turned on and off depending on the state of a checkbox.

  6. #6
    eLar
    Guest

    Re: Subforms (97)

    I'll check on the referential integrity when I get to work. I do know that the subforms are all properly linked to their parent forms. Thanks.

Posting Permissions

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