P
Paul Mason
Nah...validation controls are for amateurs. They are a complete waste of
space (literally). They're OK for required items, but they are a pain if
you want any real (programmatic) control...
You're better off handling the validation on the submit or post back
(depending on how you approach the subject)...Personally I prefer message
box's...users will actually read them coz they're annoying! Try out the
events for the controls as well...they can be quite useful.
Try :
Me.RegisterStartupScript("WARNING", "<script language=javascript>alert('" &
strWarning & "');</script>")
This will put a javacript message box into the form that will show when the
form posts back. The variable strWarning contains the text you want to
display. Works with all browsers as well.
Thus your code will look like :
if not me.ValidateControls(strError) then
Me.RegisterStartupScript("WARNING", "<script
language=javascript>alert('" & strWarning & "');</script>")
else
'Do what you need to do if it's all OK
end if
Regards...P
space (literally). They're OK for required items, but they are a pain if
you want any real (programmatic) control...
You're better off handling the validation on the submit or post back
(depending on how you approach the subject)...Personally I prefer message
box's...users will actually read them coz they're annoying! Try out the
events for the controls as well...they can be quite useful.
Try :
Me.RegisterStartupScript("WARNING", "<script language=javascript>alert('" &
strWarning & "');</script>")
This will put a javacript message box into the form that will show when the
form posts back. The variable strWarning contains the text you want to
display. Works with all browsers as well.
Thus your code will look like :
if not me.ValidateControls(strError) then
Me.RegisterStartupScript("WARNING", "<script
language=javascript>alert('" & strWarning & "');</script>")
else
'Do what you need to do if it's all OK
end if
Regards...P