mustardxhead
Technical User
I am developing a module that will generate a MSWord Document from either Database information or user input information that will be run from a switchboard. I am stuck on getting the code to pause while one of the data input forms is open. I have tried locking the code into a loop until the form is closed but that causes resource issues or fails. I am open to other methods of fixing this issue but as of now I am currently looking for a "sleep" method to pause execution of the remaining code till the data has been collected. There is a function call in the close procedure from the form that sets the formOpen variable to false so that the loop will break.
Code:
Sub getNewUser()
Dim formOpen As Boolean
MsgBox "New User Call Successful"
DoCmd.OpenForm "BuildNewUserForm", acNormal
formOpen = True
While formOpen
DoEvents
Wend
End Sub