suspending code in a form

  • Thread starter Thread starter Chris B.
  • Start date Start date
C

Chris B.

In a form I have a pull down that allows the user to
select from a list of types of process. Only one of the
choices requires the user to select a subgroup, so I have
a popup form come up. The problem is , I can not figure
out how to pause the original code based onchange while I
retrieve the additional information from the popup. the
only field on the popup is a pull down containing the
subgroup information.

Thanks

Chris
 
Hi Chris,

DoCmd.OpenForm "NameOfPopupForm",,,"[IDOnPopup] =
Me!MyForm!NameOfTextboxContainingID,,acDialog 'these two lines are 1 line

Me!SomeControl = Forms!NameOfPopupForm!SubgroupControl
DoCmd.Close acForm, "NameOfPopupForm"

You have to have a button or some other way in the popup form that makes the
popup form not visible after the subroup is selected. You do that in code by:
Me.Visible = False
 
Chris said:
In a form I have a pull down that allows the user to
select from a list of types of process. Only one of the
choices requires the user to select a subgroup, so I have
a popup form come up. The problem is , I can not figure
out how to pause the original code based onchange while I
retrieve the additional information from the popup. the
only field on the popup is a pull down containing the
subgroup information.

Use the OpenForm's WindowMode argument to open the form in
disalog mode:

DoCmd.OpenForm "theform", acNormal, _
WindoMode:= acDialog
 
Back
Top