Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2002
    Location
    Singapore
    Posts
    91

    Unanswered: Pop Up over Pop Up

    I have 1 popup form (pop up and modal set to true), lets call this form as form P. And I have other non-popup form, lets name this form as form A.

    First I run form A. On this form, I have a button that will show pop up form P. After form P appears, I also have a button on the form P that will open another instance of form A.

    Therefore, I must be able to open multiple instance of form A and form P. For form P, it's certain that it is pop up and I can just set the pop up and modal property. But form A, it can be non pop up and also pop up.

    Problem:
    When I open form A through pop up P, form A can't get focus.
    When I try to remove modal property of P, and A can get focus, but pop up P is still in front of the screen.
    When I try to remove pop up property of P, and it seems OK. But now I can select and move focus elsewhere.
    When I try to set popup and modal property of form A from the Visual Basic, I can't change the property.
    Form A must be resizable when it is firstly open (opened not through pop up P), therefore I can't just initially set the popup and modal property.

    Actually, this work OK before I use multiple instance of form. Using DoCmd.OpenForm ...... acDialog, this already solve the popup problem. Any suggestion on how to do it on multiple instance forms?

  2. #2
    Join Date
    Sep 2002
    Posts
    3
    OK. I've been doing something that has required me to solve a similar problem. It's fairly simple, unless I don't understand your problem completely.

    Don't use multiple instances of form P.

    Only use one, set popup on and modal off. Now to make another instance of form A show up, add a line in the code (of form P button click) that says:

    me.visible = false

    On form A, use normal code to make form P show up like...

    docmd.openform "form P" (or whatever)

    and then add a line that says:
    forms("form P").visible = true

    try it...

  3. #3
    Join Date
    Aug 2002
    Location
    Singapore
    Posts
    91
    Ehm... not really...


    First I run form A. On this form, I have a button that will show pop up form P. After form P appears, I also have a button on the form P that will open another instance of form A.
    As on form P, I also have a button to open new form A, therefore... from this new A, user also "may" open popup P again... and then press a button on form P to open another form A... (just like a recursive call...).
    After user finish filling the form A, user close A, and then the focus should return to the previous P, and then after this P is closed, focus back to the previous A, and so on until the opened form is only the first form A.

    Currently, I already set modal and popup for both form to true, and it "seems" to work correctly... although I still want to have dialog border when form A is pop up. But I want the first instance of form A that is opened by user directly have sizable border. Until now, I can't resolve this... Other non-multiple instance already use acDialog. For this form A (multiple instance), I don't know how to change the border. Access said that this property can't be changed from code...

  4. #4
    Join Date
    Sep 2002
    Posts
    3

    try this one...

    OK. Make the first call to open formA, but don't make it an instance. Let the first call be a normal docmd.openform "formA". But leave the button as-is on formP to call new instances of that first form. This lets the first form be sizable (dialog), as well as gives you the instances you need for later calls. It's just that the first form is the only form that's not an instance but the actual form instead.

  5. #5
    Join Date
    Aug 2002
    Location
    Singapore
    Posts
    91

    Re: try this one...

    If formA has sizable border,
    when I call using DoCmd without acDialog, the border is sizable
    when I call using DoCmd with acDialog, the border is not sizable
    when I create new instance, I can't control the border... and it is always sizable, as firstly I already set it to sizable (for the form that is opened normally).

  6. #6
    Join Date
    Sep 2002
    Posts
    3

    make 2 forms...

    Well... you could have 2 forms. The first one, say FormA1, which has it's sizable set to true, and FormA2, which is the one you can make instances of, whose sizable is set to false.

  7. #7
    Join Date
    Aug 2002
    Location
    Singapore
    Posts
    91

    Re: make 2 forms...

    Originally posted by Walmo
    Well... you could have 2 forms. The first one, say FormA1, which has it's sizable set to true, and FormA2, which is the one you can make instances of, whose sizable is set to false.
    Yes... this works! Although I still wondering if we can modify the border property (or modal property) from the code and doing exactly the same like DoCmd.OpenForm... on the multiple instance form...

Posting Permissions

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