Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Another Access Question

Thread Tools
 
Search this Thread
 
Old 13 May 2003, 11:16 AM
  #1  
Mark Pirks
Scooby Newbie
Thread Starter
 
Mark Pirks's Avatar
 
Join Date: Nov 2002
Posts: 4
Likes: 0
Received 0 Likes on 0 Posts
Post

Can you have conditional validations rules in a form or table because I can seem to be able to get it to work

I'm trying to have a conditional validation which is

iif [type] = "Cheque" then [Cheque No] is null else [Cheque No] is not null

([type] and [Cheque No] are both fields in my data table and also text boxes within my form)

Hope you can help
Old 13 May 2003, 08:01 PM
  #2  
nkh
Scooby Regular
 
nkh's Avatar
 
Join Date: May 2002
Posts: 633
Likes: 0
Received 0 Likes on 0 Posts
Post

I played about with this problem and came up with the following. I set [Ch_No] to be a required field and then set the record validation rule to the following.

([type]="cheque" And [Ch_No]>0) Or ([type]<>"cheque" And [Ch_No]=0)

This means if you have a cheque type payment it must have a number greater than zero, otherwise it must be 0 to indicate no cheque number.

I tried getting it to work with null for non cheque payments but failed, I don't see were in the rules it says you can't use conditionals but it doesn't seem to work. At a guess it won't as the expression builder does not show the program control group of functions where the if function is normally located.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
JimBowen
ICE
5
02 July 2023 01:54 PM
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
TylerD529
General Technical
2
09 October 2015 01:53 AM
Brzoza
Engine Management and ECU Remapping
1
02 October 2015 05:26 PM
Littleted
Computer & Technology Related
4
25 September 2015 09:55 PM



Quick Reply: Another Access Question



All times are GMT +1. The time now is 04:43 AM.