I've got a DoCmd.OpenForm ''formname'' which call an activeX. The ActiveX is just a calendar picking date. Upon selecting the date and clicking OK I would like the program to format a text box. I then included in my code a if..then..else... statement which format the textbox.
However once the form is opened the if..then..else statement is executed before the user has time to select the date and click OK.
How can I get the program to wait for the input. In Java I believe you would have written wait().
It is a parameter of the OpenForm method. It is about the fourth parameter. Set it to acDialog and the code will pause until the form is either closed or hidden. If you want to get data off the form that opens, just hide the form, and put code in the calling function to get the data off the form and have the calling form close the second form.