Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation MsgBox appears 3 times. Why?

Status
Not open for further replies.

cashe

Technical User
May 4, 2002
60
GB
Hi all,

I have an input form and use validation to make sure the information being entered or not entered is correct. Some of my MsgBox's appear 2 or 4 times before they finaly go away. Why is this? The vb runs On Current so when the form is opened or saved the user gets the MsgBox. I've pasted an example of my code below:

If Supplier = "0" Then
Msg = "Please enter Supplier Details."
Style = vbExclamation
Title = "ManPower"
Ctxt = 50
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
End If

Any ideas why this happens and how can i sort it would be great.

Thanks

Cashe ;-)
 
cashe: my guess is that using OnCurrent is causing your problems. Can you not have the validation handled on "afterupdate" of a particular textbox? onExit? etc?

 
Thanks Isadore,

I'll give it a go and let you know.

Cashe ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top