Another Access Question
#1
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
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
#2
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.
([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.
Thread
Thread Starter
Forum
Replies
Last Post
Brzoza
Engine Management and ECU Remapping
1
02 October 2015 05:26 PM