ScoobyNet.com - Subaru Enthusiast Forum

ScoobyNet.com - Subaru Enthusiast Forum (https://www.scoobynet.com/)
-   Computer & Technology Related (https://www.scoobynet.com/computer-and-technology-related-34/)
-   -   Another Access Question (https://www.scoobynet.com/computer-and-technology-related-34/208602-another-access-question.html)

Mark Pirks 13 May 2003 11:16 AM

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

nkh 13 May 2003 08:01 PM

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.


All times are GMT +1. The time now is 02:53 AM.


© 2024 MH Sub I, LLC dba Internet Brands