473,395 Members | 1,583 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,395 software developers and data experts.

ErrorProvider

18
Hi All,
I have used errorProvider to validate the text in the textboxes. One among them is that it does not allow the user to enter empty string.But when I click the close button on the form it does not close instead the errorProvider pops up validating for the text(As the textbox is left blank).Is there a property to disbale or to make it inactive?

Thank You in advance.
Feb 1 '07 #1
5 1271
kenobewan
4,871 Expert 4TB
If you use the warningProvider, you may want to clear it by setting it to "", after checking whether the control is valid. Here is an article that may help:
ErrorProvider as a 'Warning Provider'
Feb 2 '07 #2
artteam
18
Hi,

But I do not have to check for the validation when the user is trying to close the form without entering any text into any of the textfields. And this happening with respect to only one textform. And the close button is not bothered with other textboxes on the form. If i enter some value in that textbox then the form closes.

Please help me out!!!
Feb 2 '07 #3
kenobewan
4,871 Expert 4TB
You are having a problem with errorProvider trying to validate the empty textbox and not allowing the form to be closed... Therefore you need a way to clear it before closing, hence the suggestion. Do you have other textboxes that do not allow empty strings?
Feb 2 '07 #4
artteam
18
Yes you are right.We cleared the errorProvider before closing the form.Thank you very much for your suggestion.
Feb 2 '07 #5
have you tried this one?:
if txtbox1.text="" then
errorprovider1.seterror("txtbox1, "The txtbox should not be left blanck!")

else ' to set the error off
errorprovider1.seterror(txtbox1,"")
end if
Feb 8 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Martijn Leine | last post by:
I am using an errorprovider and a datagrid component on a form. I use the errorprovider to display error hints in the grid, in the case the entered data by the user is checked and not found Ok....
6
by: M O J O | last post by:
Hi, How do I check if an ErrorProvider has errors? Take for example this code... (err = ErrorProvider...) Public Sub Test If TextBox1.Text= "" Then
0
by: Issac | last post by:
Hi, I am writing a program which will be used in Win2000 and Win98 platform. The program include a Form (called myForm) which has a TextBox, Tooltip, Errorprovider and a Button. Tooltip...
3
by: Jeppe Jespersen | last post by:
I read the following - regarding the ErrorProvider control - in the MOC Course Material for course 2373: "You can set your own error messages manually, as shown in the following example, or when...
2
by: Lenster | last post by:
I'm having problems using the errorprovider in VB.NET to automatically display an error icon next to textboxes bound to the same dataset as the errorprovider. The sequence of events is : ...
4
by: ljlevend | last post by:
I have the following issues: 1. I want to make it so that ToolTips never go away once they are shown until the user moves the mouse outside of the control for which the ToolTip is assigned. It...
5
by: Alvaro Lamas | last post by:
I have a problem with the ErrorProvider with a mdi interface, I have a MDI form which opens a child form, that child form uses the errorprovider to show the problems with the data entry. The...
3
by: J L | last post by:
I have a from with an ErrorProvider on it. I pass a reference of the form to a subroutine where I want to reference the ErorrProvider. I could pass it in the call to the subroutine, but I would...
4
by: Freeon | last post by:
How do I capture the hover event on the ErrorProvider control? I created a custom control and inherited the ErrorProvider. Problem is I don't know which method to override to capture the hover...
2
by: Dad | last post by:
Hi, There does not appear to be anywhere for ErrorProvider to display its icon for ListView, ToolStrip, and other other control set with dockstyle fill, top, or bottom does not leave space to...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.