Text Box Validation - prevent a blank entry

E

ecurb

Hi,
I have a form with several text boxes on it.
Each test box requires some validation ... for being numeric etc.
and I am successfully using the Validating and Validated events of each
text box and an ErrorProvider to achieve this...

However, I want to validate one of the text boxes such that the user
*must* enter a value... ie. the text box must be non-blank.
I tried putting code in the Validating event to disallow a blank
value.. this did not work.
The problem is that the Validating event is only invoked if the text
box gets focus. If the user never clicks on the text box, then me error
is never displayed.

How do I force this validation .. even if text box never gains focus ?

Many thanks.
 
N

Nelson Guerra

Hello

I don't know what are you trying to do but why don't you validate if the
textbox is blank when the user make the finnal action.
Something like before send the data to the database
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top