Retain control in a popup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Folks,

I have a situation I would appreciate some help with. I have a pop form
called from a main form command button. I want to force the user to fill out
the form or to cancel. Then I want the scope control to return to the main
form at the point I opened the popup form. When I issue the OpenForm, the
form opens but control returns to the main form. I want the user to fill out
before the code in the main from continues.
Looks something like this:
Public Sub Submit_Click()

dteFrmDate = Form_frmDailyReconForm_v2.cmbBxRecFormDate
DoCmd.OpenForm "frmDailyReconPopUpChkLst"

Call Verification_Check

End sub

User must fill out pop so I can do the verification check. But once form-
popup opens, control returns control to next statement Call Verification_Check

Thanks All
 
CJ_DB,

If I understand you correctly, you can specify this behavior by setting the
WindowMode property to acDialog as such:

DoCmd.OpenForm "frmDailyReconPopUpChkLst", WindowMode:=acDialog

Hope that helps,

Jon Price
 
Jon,
Thanks for the assistance however, this did not quiet solve the issue.
acDialog does cause the popup form to stay on top while the main form is
unavailable but the code from the main form that issued the OpenForm
continues to execute after the popup form becomes current. I was looking for
an event( or code method to execute) after Form Current that would allow for
the user changes and then release control back to the main form directly
after the OpenForm(kind of like a function or subroutine call ). I can
probably recode to open the form elsewhere but this seemed like a good spot.

CJ_DB
 
CJ_DB,

hmmm. I tried this and have confirmed that it does work as I understand it.
Maybe we are miscommunicating.

I created two forms: frmMain and frmMyPopUp
Put a button named btnPopUp on frmMain and entered this code in the
btnPop_Click() event

DoCmd.OpenForm "frmMyPopup", windowmode:=acDialog
MsgBox "Continue execution"

And when I clicked the button, I don't receive the message box until I close
the frmMyPopUp form.

If this is not what you are trying to do, let me know.

thanks,

Jon Price
 
Jon,

Thanks much. It does work. I do not know why it didn't seem to at first.
Operator Head Space error I guess. Again, thanks a bunch.

CJ_DB
 
Back
Top