Greetings all.
i am trying to write an expression in a query to return a library fine calculated from the due and return dates of a book. i have the expression below, which was working fine when i had [DueDate] instead of [CalcDate], but was also only showing a fine on one record.
Fine Due: 1+(([ReturnDate]-[CalcDate])*(0.01*[DollarValue]))
Any records which did not have a value in [ReturnDate] would also not have a fine shown. So i changed the second field to [CalcDate] and added the expression below:
CalcDate: IIf([ReturnDate] Is Null,Date(),IIf ([ReturnDate] Is Not Null,[ReturnDate]))
But Access gave me a compile error when i try to run the query. It stopped doing than and now posts a dialogue box asking for a value of [CalcDate] when i try to run or view the query. But no matter what i enter, it tells me that the expression is too complex to be evaluated or is typed incorrectly.
Please help, i need this quickly.
--dunerat
i am trying to write an expression in a query to return a library fine calculated from the due and return dates of a book. i have the expression below, which was working fine when i had [DueDate] instead of [CalcDate], but was also only showing a fine on one record.
Fine Due: 1+(([ReturnDate]-[CalcDate])*(0.01*[DollarValue]))
Any records which did not have a value in [ReturnDate] would also not have a fine shown. So i changed the second field to [CalcDate] and added the expression below:
CalcDate: IIf([ReturnDate] Is Null,Date(),IIf ([ReturnDate] Is Not Null,[ReturnDate]))
But Access gave me a compile error when i try to run the query. It stopped doing than and now posts a dialogue box asking for a value of [CalcDate] when i try to run or view the query. But no matter what i enter, it tells me that the expression is too complex to be evaluated or is typed incorrectly.
Please help, i need this quickly.
--dunerat
Comment