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

Help with validation feature`

I've got a validation rule that says something like =xx or xxx or zzzz.
Though I may not have described it well it does work fine and that is really
not my question.

Here's what I'd like to do. Let's say that I choose zzzz, I'd like for
a particular control (or text box) in my form to become required. At other
times, if xx or xxx is inputed it would not be required. Is this possible?

Thanks, and as always, further explanatiions will be forthcoming,
Don..........
Nov 13 '05 #1
5 1796
Open your table in design view.
Open the Properties box (View menu.)
Beside the Validation Rule in the Properties box, enter:
([Field2] Is Not Null) OR ([Field1] Is Null Or [Field1 <> 'zzzz')

To compare fields, you need to use the *table's* validation rule (the
properties box), not the Validation Rule for a field (in the lower pane of
the table design window.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Don Sealer" <vz******@verizon.net> wrote in message
news:daXWe.2232$e_4.1723@trndny08...
I've got a validation rule that says something like =xx or xxx or
zzzz.
Though I may not have described it well it does work fine and that is
really
not my question.

Here's what I'd like to do. Let's say that I choose zzzz, I'd like for
a particular control (or text box) in my form to become required. At
other
times, if xx or xxx is inputed it would not be required. Is this
possible?

Thanks, and as always, further explanatiions will be forthcoming,
Don..........

Nov 13 '05 #2
Don Sealer wrote:
I've got a validation rule that says something like =xx or xxx or zzzz.
Though I may not have described it well it does work fine and that is really
not my question.

Here's what I'd like to do. Let's say that I choose zzzz, I'd like for
a particular control (or text box) in my form to become required. At other
times, if xx or xxx is inputed it would not be required. Is this possible?

Thanks, and as always, further explanatiions will be forthcoming,
Don..........

This might best be handled in the form's BeforeUpdate event. Ex:
IF Me.Text0 = "zzzz" And IsNull(Me.ParticularControl) Then
msgbox "The field ParticularControl is required."
Me.ParticularControl.SetFocus
Cancel = True
Endif

Thus, if "zzzz" check the value of the control and if blank require
something.
Nov 13 '05 #3
Thanks for the quick reply. However I'm not understanding either of the
replies. I think I understand what your saying althoug I'm not sure how to
enter or write what you are telling me. Also now that I have read your
replies and re-read my question I think I need to add more detail, which I
probably should have done in the first place.
This part of my database has three objects(?).

Tables:
Red Tag DC
Resolution

Form:
Red Tag DC Form

In the form is also a field (Combo Box) called "Resolution". The Resolution
field (combo box) has several options, one of those options is "Use As Is".
Also in the form is a field (Text Box) called TDA#.
Both of these fields are "not required".
If someone enters "Use As Is" into the Resolution field (combo box) I'd like
to have the TDA# field become "required".
Is this possible? Is it still as you have replied to me originally? If so
could you give me some more help in entering the information necessary to
make it happen? If it requires other code would you please provide the
detail?
If it can't happen at all thanks for your interest and I apologize for
wasting your time in the first place.

I'll explain why I'd like this. The only way product can, or should, be
used when designated as "Use As Is" is with a TDA. So making this field
"required" when someone enters "Use As Is" would ensure that this
information is recorded.

I hope I've explained this better and once again I apologize for not doing
this in the first place.


"Don Sealer" <vz******@verizon.net> wrote in message
news:daXWe.2232$e_4.1723@trndny08...
I've got a validation rule that says something like =xx or xxx or zzzz. Though I may not have described it well it does work fine and that is really not my question.

Here's what I'd like to do. Let's say that I choose zzzz, I'd like for a particular control (or text box) in my form to become required. At other times, if xx or xxx is inputed it would not be required. Is this possible?
Thanks, and as always, further explanatiions will be forthcoming,
Don..........

Nov 13 '05 #4
Exactly as in the previous reply, set the Validation Rule on your *table*
as:
([TDA#] Is Not Null) OR ([Resolution] Is Null Or [Resolution <> 'Use As
Is')

The rule can be satisfied two ways:
If TDA# is not null, it's happy.
Otherwise, it happy is Resolution is not 'Use As Is'.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Don Sealer" <vz******@verizon.net> wrote in message
news:382Xe.4281$i86.23@trndny01...
Thanks for the quick reply. However I'm not understanding either of the
replies. I think I understand what your saying althoug I'm not sure how
to
enter or write what you are telling me. Also now that I have read your
replies and re-read my question I think I need to add more detail, which I
probably should have done in the first place.
This part of my database has three objects(?).

Tables:
Red Tag DC
Resolution

Form:
Red Tag DC Form

In the form is also a field (Combo Box) called "Resolution". The
Resolution
field (combo box) has several options, one of those options is "Use As
Is".
Also in the form is a field (Text Box) called TDA#.
Both of these fields are "not required".
If someone enters "Use As Is" into the Resolution field (combo box) I'd
like
to have the TDA# field become "required".
Is this possible? Is it still as you have replied to me originally? If
so
could you give me some more help in entering the information necessary to
make it happen? If it requires other code would you please provide the
detail?
If it can't happen at all thanks for your interest and I apologize for
wasting your time in the first place.

I'll explain why I'd like this. The only way product can, or should, be
used when designated as "Use As Is" is with a TDA. So making this field
"required" when someone enters "Use As Is" would ensure that this
information is recorded.

I hope I've explained this better and once again I apologize for not doing
this in the first place.


"Don Sealer" <vz******@verizon.net> wrote in message
news:daXWe.2232$e_4.1723@trndny08...
I've got a validation rule that says something like =xx or xxx or

zzzz.
Though I may not have described it well it does work fine and that is

really
not my question.

Here's what I'd like to do. Let's say that I choose zzzz, I'd like

for
a particular control (or text box) in my form to become required. At

other
times, if xx or xxx is inputed it would not be required. Is this

possible?

Thanks, and as always, further explanatiions will be forthcoming,
Don..........


Nov 13 '05 #5
Thank you, I got it, did it, and it works.
I must be getting better I only had to ask how one time:) Now it's time for
another question.
Thanks again,
Don...........
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:43***********************@per-qv1-newsreader-01.iinet.net.au...
Exactly as in the previous reply, set the Validation Rule on your *table*
as:
([TDA#] Is Not Null) OR ([Resolution] Is Null Or [Resolution <> 'Use As Is')

The rule can be satisfied two ways:
If TDA# is not null, it's happy.
Otherwise, it happy is Resolution is not 'Use As Is'.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Don Sealer" <vz******@verizon.net> wrote in message
news:382Xe.4281$i86.23@trndny01...
Thanks for the quick reply. However I'm not understanding either of the
replies. I think I understand what your saying althoug I'm not sure how
to
enter or write what you are telling me. Also now that I have read your
replies and re-read my question I think I need to add more detail, which I probably should have done in the first place.
This part of my database has three objects(?).

Tables:
Red Tag DC
Resolution

Form:
Red Tag DC Form

In the form is also a field (Combo Box) called "Resolution". The
Resolution
field (combo box) has several options, one of those options is "Use As
Is".
Also in the form is a field (Text Box) called TDA#.
Both of these fields are "not required".
If someone enters "Use As Is" into the Resolution field (combo box) I'd
like
to have the TDA# field become "required".
Is this possible? Is it still as you have replied to me originally? If
so
could you give me some more help in entering the information necessary to make it happen? If it requires other code would you please provide the
detail?
If it can't happen at all thanks for your interest and I apologize for
wasting your time in the first place.

I'll explain why I'd like this. The only way product can, or should, be
used when designated as "Use As Is" is with a TDA. So making this field
"required" when someone enters "Use As Is" would ensure that this
information is recorded.

I hope I've explained this better and once again I apologize for not doing this in the first place.


"Don Sealer" <vz******@verizon.net> wrote in message
news:daXWe.2232$e_4.1723@trndny08...
I've got a validation rule that says something like =xx or xxx or

zzzz.
Though I may not have described it well it does work fine and that is

really
not my question.

Here's what I'd like to do. Let's say that I choose zzzz, I'd like

for
a particular control (or text box) in my form to become required. At

other
times, if xx or xxx is inputed it would not be required. Is this

possible?

Thanks, and as always, further explanatiions will be forthcoming,
Don..........



Nov 13 '05 #6

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

Similar topics

6
by: Hernán Castelo | last post by:
should i to validate all the "Request"s calls like Request.FORM("...") and Request.Cookies("...") ???? if it is so, i have to see inside every "Input" elements like "Text" and even "Hidden"...
4
by: Tim Meagher | last post by:
I am trying to use both validation controls and to add submit button attributes, but when I add the button attributes, the javascript fpr the validation controls is no longer created for the page. ...
1
by: Paul | last post by:
Hi, I'm developing a search facility for my web app. In order for the search criteria to be valid the user must (a) enter some text in a text box and check and least one checkbox (of which there...
2
by: Barbara Alderton | last post by:
I setup some standard Required Field Validation controls and one Custom validation control on an ASP.NET page (within a user control) to validate text entry. I also setup a Summary Control to post...
7
by: phillip.s.powell | last post by:
Now I have another SQL query for MySQL I can't figure out!! This is overwhelming me completely and I also must have this figured out today and I can't figure it out!! UPDATE student_db.student...
4
by: ibiza | last post by:
Hi all, I have a small question concerning asp.net 2.0 validation groups. I have this (simplified) situation : Name Value _____ _____ |_____| |_____| _____ _____...
1
by: steve_marjoribanks | last post by:
I've posted this here and in the comp.lang.java.programmer group because I'm not really sure if it's a Java problem or an XML problem! Basically I have written a Java application which loads an...
3
by: teo | last post by:
Mozilla error on postback and validation ----------- A Button causes a Listbox to desappear. If no item has been selected on the Listbox, all is OK. If one or more items are selected,
53
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script...
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:
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
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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...
0
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,...

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.