suspending code in a form

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
 
P

PC Datasheet

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
 
M

Marshall Barton

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
 

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