Results 1 to 3 of 3
  1. #1
    ETCallHome is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2011
    Location
    Limpopo, South Africa
    Posts
    48

    Opening more than one form (Not Multiple Instances of the Same form)

    Hi,

    I tried searching for help, but the search just brings up multiple instances of the same form. Here is what I would like to accomplish. I open form frmA and the user selects a record and want to modify the record. But before opeing the form frmB to modify the record, I want to direct the user to another form frmC first to enter the reason they are modifying the record. Below a sample code in frmA:

    if modify then docmd.openform "frmC"
    docmd.openform "frmB"

    what happens is that it opens form frmC and immediately opens frmB. Form frmB is the one visible to the user, this means the user can then modify the record without entering the reason for modifying. When they exit, form frmC is visible and they can then exit without entering the reason.



    There are different ways that I can accomplish this, but it makes sense to do it this way, the only catch, how do I open form frmC and only after the user exits then form frmB opens. I made both forms modal, as I am under the impression that a modal form will wait for user interaction before executing the next line of code... it seems my assumption has proved me wrong..

    If there is a way, I would appreciate the help, else I will have to then open frmB and when the user exits, open form frmC and force the user to enter the reason.

    Another problem I have is that every now and then the form opens in a different size, i.e. Popup forms. One moment it is fine and the next moment it opens smaller than the form size stipulated. Is there anyway I can ensure that this does not happen, because I have to save the forms again and then it works fine...

    Thanks
    Earl

  2. #2
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2003
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254

    ETCallHome -

    You could set the modal property of formC to Yes. Then in the after update event of the reason field on formC, if it is not null and is a valid entry, DoCmd.OpenForm "formB" and DoCmd.close "formC".

    Edit: You might also want to remove the close button as well as min/max buttons on formC.

    Just a thought.

    Jim
    Last edited by ketbdnetbp; 08-16-2011 at 04:19 PM. Reason: Close button consideration

  3. #3
    ETCallHome is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2011
    Location
    Limpopo, South Africa
    Posts
    48
    Hi,

    Thanks for the advice, but I landed up passing the form name that is calling the form as a parameter to form FrmC and when the user enter the save/add button, I check if the form name passed across is FrmB, then after the add/save of the record, I open FrmB.

    Earl

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 07-26-2011, 08:26 AM
  2. Replies: 3
    Last Post: 06-22-2011, 08:51 AM
  3. Multiple Payment Instances
    By luckysarea in forum Queries
    Replies: 3
    Last Post: 04-21-2011, 03:29 PM
  4. Replies: 5
    Last Post: 03-11-2011, 10:29 PM
  5. Replies: 1
    Last Post: 11-09-2010, 03:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums