Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    St. Marys, Ontario, Canada
    Posts
    270
    Thanks
    0
    Thanked 0 Times in 0 Posts

    A different subform depending on a value (2002)

    Let's say we had information about a person in the main form. In the subform, we have more information about the type of form the person is filling out, the date it is filled out and so on. Is it possible to have the subform of the subform different depending on the value in a field. For example, the subform types could be income tax, insurance, and time sheet, each requiring different fields of information, but connected to the main form through the 1st level subform. So if you select income tax, the subform displays the income tax form. If you select insurance, a diffent form appears in the subform.

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

    Re: A different subform depending on a value (2002)

    I'd create a tab control on the subform (or even on the main form), with tabs for income tax, insurance etc. Each tab page would contain the appropriate subform. So if the user clicks on the insurance tab, the insurance subform becomes visible, etc.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    St. Marys, Ontario, Canada
    Posts
    270
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: A different subform depending on a value (2002)

    I tried this, but since both forms on the tabbed subform were connected to the form table, when I populated the fields with data on one of the tabbed subforms, it tried to add data on the other one, too. How do I prevent this?

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

    Re: A different subform depending on a value (2002)

    That appears to be a problem in your data design. If you don't want both subforms to populate the same table, you should create separate tables for each of them (linked to the table behind the main form by an ID field).

Posting Permissions

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