I’m trying to alter a field in an existing database so the person entering data can choose 1 of 3 options, and in another field a date is calculated and inserted. My current database does this with 2 options…the person chooses 6 months or 1 year, and the date 6 months or 1 year beyond is inserted in another field. Here is my current code to do this: PaidThrough: IIf([Member Type]=”6 months”,DateAdd(“m”,6,[Last Paid]),DateAdd(“m”,12,[Last Paid])).
Now I’m adding a 3rd option – 1 month – and I’m not having any success. Here is the closest I’ve come: PaidThrough: IIf([Member Type]=”1 month”,DateAdd(“m”,1,[Last Paid]) or If[Member Type]=”6 months”,DateAdd(“m”,6,[Last Paid]),DateAdd(“m”,12,[Last Paid])) but it says my operators and operands aren’t in order. I’ve tried many different Ifs, elses, or options and none have worked. Any suggestions? I’m thinking I’m missing something simple.
-
Access Expression (Access 97)
- This topic has 12 replies, 6 voices, and was last updated 21 years, 8 months ago.
AuthorViewing 1 reply threadAuthorViewing 1 reply thread