Main form and 2 subforms

abab Member Posts: 37
Hi,

I have a main form, 1 subform depending on the main form and a second subform depending on the first subform.
How can I show the correct data in the second subform when I select an other record in de first subform ?

main form : all my machines
subform 1 : all the tasks of my machine
subform 2 : all the information when a task is executed

If I choose another task of the same machine, subform 2 must display the correct information.

Thx,

Comments

  • MBergerMBerger Member Posts: 413
    As far as i know, a subform can be any form, even a form that has a subform itself. So make a form for your tasks and taskinformation, and use THAT form as a subform in your machine form.
  • abab Member Posts: 37
    Mberger, I've already tried to do that but a subform cannot be started within a subform !
  • garakgarak Member Posts: 3,263
    Per default a Subform can't contain a other subform.
    so what you need. you create 3 forms.

    The 1st is the Mainform wit 2 Containers for the 2 subforms
    The 2nd is the form for subform A
    the 3rd is the form for Subform B

    Now the trick (is also here explained in the forum search for it).
    If you select a rec on mainform you update also Suibform A und B (thats no problem)
    If you select a rec on Subform A you send back the information to Mainform (viewtopic.php?f=23&t=22564&hilit=subform) per XMLDom or Timer (timer is not so good in my eyes) and from there to the SubForm B and update then Subform B.

    Regards
    Do you make it right, it works too!
  • MBergerMBerger Member Posts: 413
    ab wrote:
    Mberger, I've already tried to do that but a subform cannot be started within a subform !
    i apologize, my mistake.
  • Manolo_SPAManolo_SPA Member Posts: 19
    Sorry for question but i'm completly blocked....

    1 main form (order), and 2 subform.: 1 is sales line and other is Item list. I want that when i move up and down sales line, in 2nd subform, item included in sales line is highlight (it doesn't matter how. I mean, i know how).

    so i use XML to call form subform to main form, and then i call function at 2nd subform to find that record and update.
    But i get an error or item list doesn't move.

    Any suggestions??

    regards.
  • Manolo_SPAManolo_SPA Member Posts: 19
    new day and everythin solved. Used XMLDOM and Currform.UPDATE(False).

    thanks.
  • ajhvdbajhvdb Member Posts: 672
    Nice, but are the modifications by the user then not lost with Currform.UPDATE(False)?
Sign In or Register to comment.