To get back to your original question re: closing the form - you might notice that there is NO explicit statement in the UDF that closes the form.

Because you have declared the FORM local to the UDF, it automatically closes when the $WAIT variable goes out of scope, and gets closed when the form is disposed.

-Shawn

[ 28. November 2002, 22:29: Message edited by: Shawn ]