Results 1 to 9 of 9
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    pop up form (Access 2003)

    I have two forms, one calls the other one to pop up and display a combobox. Once the user has selected an item from the combobox in the popup form, he will return to the main form. However, I notice that the textbox (supposed to show the selection on the popup form) on the main form always lags behind. I would like to know if there is a simple solution to it.

    thanks

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: pop up form (Access 2003)

    Why not use a combo on the main form?

    How is the text box on the main form populated? What do you mean it lags behind?

  3. #3
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: pop up form (Access 2003)

    I have a few other forms that will use this pop-up form.

    When I first call the pop-up form and pick, say, 2 from the combobox, return back to the calling form, nothing there. Then I click on the button to call the pop-up form again and then pick 3 from the combobox, return back to the calling form, now it shows 2, instead of 3.

    See the attached database for an demo.

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: pop up form (Access 2003)

    I would still introduce a combo box on the main form. Even if you have other forms that need a combo box I would introduce the combo box for each of these forms as well.
    Try the following command in frm Test:
    <pre> DoCmd.OpenForm "frmReason", acNormal, , , , acDialog

    This keep the frmReason form open, which allows the command after the FormOpen to address the opened form.
    </pre>


  5. #5
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: pop up form (Access 2003)

    In the main form, if the user wants to register a customer who wants to cancel a booking will have to select the reason from the pop-up form. It does not look right if the combobox is there already when no one cancel a booking.

    I have tried to zip up the mdb file but it is over 100k and cannot be uploaded. I will try again.

  6. #6
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: pop up form (Access 2003)

    Here is the zip file. If you pause the program, you will notice that the saveRecord procedure is called before executing the pop-up form.

  7. #7
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: pop up form (Access 2003)

    Sorry, here is the file.

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

    Re: pop up form (Access 2003)

    Making a form a popup form only means that it will remain in front of all normal forms, but users can still click in another form, and code will not pause until the user closes it.
    To prevent users from clicking in another form, and to ensure that code will wait until the user closes the form, you must either make it modal too (set its Modal property to Yes), or call the form the way Patt recommended:

    DoCmd.OpenForm FormName:="frmReason", WindowMode:=acDialog

  9. #9
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: pop up form (Access 2003)

    yes, thanks. It works now with the suggested changes.

Posting Permissions

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