473,385 Members | 1,402 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Error provider

I have an errorprovider in a tabControl

i use this to validating all field required
Private Sub Champs_Validating(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles txtSociete.Validating,
txtAdresse.Validating, txtCodePostal.Validating, txtVille.Validating
Dim monControl As TextBox = CType(sender, TextBox)
If (monControl.Text.Trim().Length = 0) Then
ErrorProvider1.SetError(monControl, "Merci de renseigner ce
champ.")
Else
ErrorProvider1.SetError(monControl, "")
End If

End Sub
===>> my problem : When i click the submit button... (and my requiered
fields are empty) nothing stop me...!!!

Why ?

Mar 23 '06 #1
5 1473
may be hard to stop you :) Let's see if we can at least stop the exit
from the edit state with:

e.Cancel = True
.....
Else
ErrorProvider1.SetError(monControl, "")
End If

Mar 23 '06 #2
oh thx but it's only work for my first control Handles
txtSociete.Validating

all the other txtAdresse.Validating, txtCodePostal.Validating,
txtVille.Validating doesn't work

i must have several validating sub ??? for working ?

Mar 23 '06 #3
no sorry it's only working if the empty field have the focus

Mar 23 '06 #4
it depends on the effect you want to achieve. If you want to let the
user free to do anything and check only at the end, you will do the
checking at the "Closing" event (assuming we are talking of a kind of
dialog form) ...

Mar 23 '06 #5
i have a form and some field in a form

when the user click submit i want to stop it if the requiered field are
empty

i think errorprovider with validating could do that ? but it's working
only if the user leave all requiered field with empty to have a warning
!!!

Mar 23 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: jrefactors | last post by:
My machine is Windows XP with Oracle 9.2 Home; IIS and Oracle are in the same box. I have tried both Oracle OLEDB Provider and Microsoft ODBC For Oracle, but both not working. For Microsoft...
0
by: tony dong | last post by:
Hi there I use vs.net 2005 with standard sql 2005 under machine\sql2005 for instant when I create webpart, the code get from quickstart as follow: <%@ Page Language="C#" %> <%@ Register...
6
by: Chris Love | last post by:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not...
7
by: deltalimagolf | last post by:
I now get the following error message after copying an asp.net application to the deployment web server. I don't have SQLExpress or any version of SQL 2005 installed. I found the "LocalSQLServer"...
7
by: Alan Pretre | last post by:
I have an application installed at a customer site that has been getting a general network error for a couple of years. I was hoping that .NET 2.0 would clear it up, but unfortunately it didn't. ...
2
by: Charles Wilt | last post by:
I have a IBM iSeries (aka AS-400) running v5r3 of OS/400 that I access via a linked server from SQL Server 2000. The following select works fine: select * from...
1
by: NEWS | last post by:
My application is giving error .pls help . error : Server Error in '/webpdms' Application. -------------------------------------------------------------------------------- An error has...
3
by: Ted | last post by:
In WSAT, I get the following error when trying to set up my provider: Could not establish a connection to the database. If you have not yet created the SQL Server database, exit the Web Site...
5
by: Alan Silver | last post by:
Hello, Server configuration: Windows 2003 Server SP2 SQL Server 2000 SP4 ..NET v2.0.50727 just built up a new server using the same configuration as my current one. I even used the same CDs...
5
by: Cirene | last post by:
I just deployed my new ASP.NET (3.5 FW) site to the hosting company I'm using, webhost4life. NOTE: I HAVE deployed other SQL Server sites to the same account with no issues. Now I'm getting...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.