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

Value required (sometimes)

P: n/a
Hi all,
This is probably a really simple question but I have been unable to
figure it out. I have a field ([qty_refused]) which needs to have a value
entered by the user but only if another field ([ret_ref]) is not null. By I
have set the default value of ([ret_ref]) to null. I can't set the
"required" value of the field to yes as it isn't required all the time and
haven't been successful trying to set a validation rule.

Any help would be much appreciated,

Mark
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
1. Open your table in design view.

2. Open the Properties box (View menu).

3. Beside the Validation Rule in the the Properties box, enter something
like this:
([ret_ref] Is Null) OR ([qty_refused] Is Not Null)

The rule can be satisifed two ways:
- if ret_ref is Null, it's happy;
- otherwise, the only way it can be satisfied is if qty_refused is not null.

Make sure you use the Validation Rule in the Properties box (i.e. the rule
for the table), not the one in the lower pane of table design view (which is
the rule for a field).

--
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.

"Mark Reed" <ma*********@ntlworld.com> wrote in message
news:3G*************@newsfe2-gui.ntli.net...

This is probably a really simple question but I have been unable to
figure it out. I have a field ([qty_refused]) which needs to have a value
entered by the user but only if another field ([ret_ref]) is not null. By I have set the default value of ([ret_ref]) to null. I can't set the
"required" value of the field to yes as it isn't required all the time and
haven't been successful trying to set a validation rule.

Nov 13 '05 #2

P: n/a
Thanks Allen,
That worked a treat and I have learnt a valuable lesson. I did not know
about the table properties box and had been trying a similar argument in the
field properties box. Now I know why it didn't work.

Regards,

Mark

"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:41***********************@per-qv1-newsreader-01.iinet.net.au...
1. Open your table in design view.

2. Open the Properties box (View menu).

3. Beside the Validation Rule in the the Properties box, enter something
like this:
([ret_ref] Is Null) OR ([qty_refused] Is Not Null)

The rule can be satisifed two ways:
- if ret_ref is Null, it's happy;
- otherwise, the only way it can be satisfied is if qty_refused is not null.
Make sure you use the Validation Rule in the Properties box (i.e. the rule
for the table), not the one in the lower pane of table design view (which is the rule for a field).

--
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.

"Mark Reed" <ma*********@ntlworld.com> wrote in message
news:3G*************@newsfe2-gui.ntli.net...

This is probably a really simple question but I have been unable to
figure it out. I have a field ([qty_refused]) which needs to have a value entered by the user but only if another field ([ret_ref]) is not null. By
I
have set the default value of ([ret_ref]) to null. I can't set the
"required" value of the field to yes as it isn't required all the time

and haven't been successful trying to set a validation rule.


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.