If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Unanswered: Executing one line of code at a time in a procedure

I have 2 forms that have 6 signature combo box fields on each of them. I have created an On Click procedure. When the combo box is clicked, I have a popup form I want to activate. The popup form asks for a userid and password, if the password is correct, I am passing the person's name to the combo box. Here is my code for the combo box.

Private Sub ProdEng_Click()
'test for Signature approval, if authorized, sign their name

DoCmd.OpenForm "Password_Protect"

Me!ProdEng = getpwd.FirstName + " " + getpwd.LastName
End Sub

I need for the "DoCmd.OpenForm" to process first. The getpwd.firstname and lastname will be assigned in the popup form "Password_Protect".

When I click on the combo box, all of the sub commands are immediately executed. How can I force it to open the Password_Protect form and not execute the line Me!ProdEng= getpwd.FirstName + " " + getpwd.LastName until the popup form closes?