473,565 Members | 2,770 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Validating entry in one of the fields

I have a form where the user need to fill some fields. some of these
fields are address fields (street, city, state, zip)
i want to validate that atleast one of these fields if filled with
data. then problem is that the CustomValidator control will not check
empty fields and the RequiredFieldVa lidator control can not check
multiple controls.

How do i do this?

Thanks

Nov 19 '05 #1
1 1084
There are two solutions.

1. The CustomValidator , as you have indicated. To avoid its requirement that
the field is not blank, do NOT assign anything to ControlToValida te. It will
fire on submit only.

2. If you think that your validation will require using the CustomValidator
frequently, my Professional Validation And More
(http://www.peterblum.com/vam/home.aspx) helps avoid custom coding. It has
22 validators. One is the MultiConditionV alidator, which you use to combine
other validator's rules within a boolean condition. In your case, you need
the boolean condition of "Street is Required OR City is Required OR State
is Required OR Zip is Required). You will do all of this within the design
mode Properties Editor and it will even support client-side validation. My
client-side validation works on many more browsers than Microsoft's
validators too.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

<da*****@office core.com> wrote in message
news:11******** *************@c 13g2000cwb.goog legroups.com...
I have a form where the user need to fill some fields. some of these
fields are address fields (street, city, state, zip)
i want to validate that atleast one of these fields if filled with
data. then problem is that the CustomValidator control will not check
empty fields and the RequiredFieldVa lidator control can not check
multiple controls.

How do i do this?

Thanks

Nov 19 '05 #2

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

Similar topics

5
5981
by: Steve | last post by:
I am currently trying to validate data in an access database. I need to verify that columns containing date information are in the format ddmmyyyy and columns containg time information are in the format HH:MM 24. The dates and times are stored in text fields. ie date 12121998, time 20:34 Could anyone suggest a method for validating the...
0
1405
by: pilar | last post by:
Hi All, It is possible to restrict data entry for 2 fields at the same time?, i know how this may sound for you, please don't insult me (just kidding, this is a great newsgroup). In my first Access database I just found a big design mistake. There is a table - tblsystem- with 2 fields -upperprinter and lowerprinter- this 2 fields contains the...
1
2885
by: panche | last post by:
I'm developing a fairly simple user control that has two textboxes for date/time entry (a from date/time and a to date/time). One of my requirements is that there should be no button that sets these values (i.e., no button to cause a postback). The problem I'm having is that I need a number of validations to be performed on the data entry,...
0
2425
by: Gary Shell | last post by:
I am experiencing some strange behavior between a UserControl's validating event and a treeview control. Initially, I thought it was related to an issue in the Knowledgebase article 810852 (http://support.microsoft.com/kb/810852), but then I realized that the hotfix mentioned was in .Net v1.1, which I am using. I took the sample from that...
0
1800
by: Wayne Phipps | last post by:
Hi There, I want to be able to validate data entered by a user onto a form. Different fields will have different validation requirements. As an example, a text box may only allow numeric, alpha or alpha numeric entry and/or may have limitations on length or value. I thought about inheriting a control from one of the standard forms...
3
1967
by: Hamed | last post by:
Hello I have a Data Entry Form having some controls including a TextBox. When the user types an entry, I query a table and if it was entered before, I ask the user (using ShowModal method of a custom message form) if he wants to see his old entry in a new form. if he/she choose Yes, I create a new form and show the previously entered data...
0
1789
by: Lucilue2003 | last post by:
Hello, I need help validating an xml file against an external DTD. The below code allows me to read the xml file and gather specific elements of interest. If the xml looked like this, How would i validate it ? <?xml version='1.0' encoding='utf-8'> <simpsons type='bank' platform='TV' app-version='1.0.0'> <header>
0
923
by: GOgier | last post by:
I am new to VB and struggling with the following Word form problem: I am designing a Word form whereby the collective values from 10 different dropdowns must be tested to ensure that any 2 combinations is valid against a set of established rules. For example; there are 10 dropdowns called Responsibility1, Responsibility2......
2
2555
by: lrheeza | last post by:
Hello everyone, I am a newbie at MS Access and I need help!!! I am importing an excel file using Import functionality in MS Access, all the fields are required but there are instances in the excel sheet wherein some of the fields are not populated. The fields that are being imported are: Full Name, first name, last name, initial ...
0
7666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8108
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7644
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7951
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.