Pause code while waiting for a popup form to close

J

Jason

Senario: I have a popup form that I want the user to complete before the
code continues to run

Questions: Is there a way to pause the code until the user closes the popup
box

Thanks in advance
Jason
 
M

Marshall Barton

Jason said:
Senario: I have a popup form that I want the user to complete before the
code continues to run

Questions: Is there a way to pause the code until the user closes the popup
box


Open the form using OpenForm's WindowMode argument set to
acDialog.
 
F

fredg

Senario: I have a popup form that I want the user to complete before the
code continues to run

Questions: Is there a way to pause the code until the user closes the popup
box

Thanks in advance
Jason

If you open the pop-up form in dialog mode, all processing will wait
until the form is close.

DoCmd.OpenForm "FormName", , , , , acDialog
 
J

Jason

Thanks for the help

Jason


fredg said:
If you open the pop-up form in dialog mode, all processing will wait
until the form is close.

DoCmd.OpenForm "FormName", , , , , acDialog
 
J

Jason

Fred,

I used the method discribed and it worked fine except when I try to populate
the form with values from the main form, it tells me it can not find the
popup form. If I use acWindowNormal, the popup form populates properly
however it allows the user to click on other forms without completing the
popup. Below is the code I am using

Private Sub CS_New_Click()
If Me.CS_New Then
Dim strACDID As String
Dim strMONUM As String
Dim strMO As String

strACDID = Forms![frm_ACD_VA_Purchasing]![TransID]
strMO = Forms![frm_ACD_VA_Purchasing]![Manufacturer]
strMONUM = Forms![frm_ACD_VA_Purchasing]![MO_ID]

DoCmd.OpenForm "frm_ZBM", acNormal, , , acFormEdit, acDialog

DoCmd.GoToRecord , , acNewRec
Forms![frm_ZBM]![ACD_ID] = strACDID
Forms![frm_ZBM]![MO_No] = strMONUM
Forms![frm_ZBM]![Manufacturer] = strMO
DoCmd.GoToControl "Category"
End If

End Sub

Thanks
Jason
 
J

Jason

Albert ,

Thanks for your help. Your paper was very informative and I was able to
better understand what I needed to do to accomplish my goal.

Thanks
Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top