I would abandon the Query_Close Event and rather use a CommandButton
with this code:
Private Sub CommandButton1_Click()
If Len(TextBox1).text = 0 Then
MsgBox "please complete all mandatory fields"
Exit sub
Else
Unload UserForm1
Userform5.Show
End If
End Sub
--
Myles
------------------------------------------------------------------------
Myles's Profile:
http://www.excelforum.com/member.php...o&userid=28746
View this thread:
http://www.excelforum.com/showthread...hreadid=500988