473,324 Members | 2,567 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,324 software developers and data experts.

Validation questions...

Ok, I have been looking all over fro answers to these two questions and
can't seem to locate anything... I am still looking but figured that I would
drop a query here also....

1) The ErrorProvider control does not seem to offer any way that I can
check the control once to see if it has ANY errors registered for any of the
controls on my form. I have several controls that make use of the
ErrorProvider control and would love to simply do the following form my
forms same button:

If (errProvider.Errors > 0 ) Then
'Stop the save here

Else
'Continue saving the data here

End IF

But I cannot seem to do this. I seem to have to loop through the GetError
method passing in each control as I loop and see if the Length property is >
0. I then increment a counter and then when I am done I check the counter
to see if it is > 0, if it is I stop the save. Seems like a bit more work on
my part. I can't believe that the ErrorProvider doe snot have a simple
Errors collection that I can get a count on, or even an overloaded GetError
method that simply checks for the existence of ANY error...

2) Is it me or does using the Validating event still not work just right?
It seems to require that the user always move off the control explicitly
before it fires. I am not 100% sure if what I am seeing is just something in
my code or something wrong in the forms system (VB6 also has similar issues
if I remember correctly). For example, if I have three text boxes and a save
button, and I fill the data into all three boxes then from the third I just
click onto the save button I don't think I am seeing the third text boxes
validating event firing.
Jul 21 '05 #1
1 1379
Ray,

A very complete message again, to give some answers about it and not inline,
because that can become confusing in my opinion.

You can make one event for all your validating of your textboxes by adding
the handler dynamicly to that event. When you want a sample, I can make
that, it is very simple and there are more methods to do, so tell than if it
are all textboxes or only a selection.

The validating event fires in a sequence wherein is also the lostfocus
event. You can search on MSDN for that sequence for it, while there are two
sequences, dependable which control starts the sequence.

I hope this helps something?

Cor
Jul 21 '05 #2

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

Similar topics

11
by: r0adhog | last post by:
First off wanted to that all that replied to my previous questions, you were much help. Had a couple of general questions. Why has everyone suggested not using VB Script on the Client Side? ...
41
by: Gérard Talbot | last post by:
Cross-posted to: comp.infosystems.www.authoring.html and alt.html Followup-to: comp.infosystems.www.authoring.html 1- One day, I stumbled across a website that offers to validate webpages. What...
7
by: A.M | last post by:
Hi, I have a validation control in my page that upon any invalid data, it disables all buttons in the page. basicly i don't have any postback in the page if the validator finds any error. How...
5
by: M | last post by:
Hi, it's possible to append a custom action to a client-side verification of a validation control ? I have a validator summary control that shows (automatically) a message box if the validation...
5
by: Lloyd Dupont | last post by:
On my page the user is ask to set of question. Say there I have 2 controls like that == pseudo-C#-code for my control == class MyControl : CompositeControl { TextBox text; LinkButton button ...
9
by: julie.siebel | last post by:
Hello all! As embarrassing as it is to admit this, I've been designing db driven websites using javascript and vbscript for about 6-7 years now, and I am *horrible* at form validation. To be...
1
by: Rajani | last post by:
Hi, I have designed a form which process database Insert, edit and Delete(datagrid). I input userid,password and privilege in textboxes which has validation controls to verify data keyed in....
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
2
by: moondaddy | last post by:
How can I have a page with 2 different groups of controls (where each group of controls contain textboxes, validation controls and a submit button) and each group operate independently? for...
8
by: Bryan | last post by:
I want my business objects to be able to do this: class Person(base): def __init__(self): self.name = None @base.validator def validate_name(self): if not self.name: return
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.