By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,249 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Help with validation feature`

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.