Another Criteria on calculated field problem

B

bruch04

Hi. This is the following SQL statement. I'm getting no records
returned. If I remove the where clause it's fine. I understand it's
probably a problem with the fact that column 5 ([Due Date]) is
calculated from column 4 ([CalDate]), but none of the answers to
previous posts seem to work for me.

By the way, the IIf statement looks fairly complex, but it just
calculates a date based on the most recent follow-up report we've
received (up to 8). Then Due Date checks to see if the case was fatal
or not and adds the appropriate number of days we have to submit the
report to the authorities.

***
SELECT SAE.PILast, SAE.Ptno, SAE.Event,

IIf(IsNull([FU8]),IIf(IsNull([FU7]),IIf(IsNull([FU6]),IIf(IsNull([FU5]),IIf(IsNull([FU4]),IIf(IsNull([FU3]),IIf(IsNull([FU2]),IIf(IsNull([FU1]),[Initial],[FU1]),[FU2]),[FU3]),[FU4]),[FU5]),[FU6]),[FU7]),[FU8])
AS CalDate,

IIf([Fatal]=1,DateAdd("d",3,[CalDate]),DateAdd("d",7,[CalDate])) AS
[Due Date], SAE.Fatal
FROM SAE

WHERE (((5) Between Date() And DateAdd("m",3,Date())))

ORDER BY 5;
***

Can someone figure out why no records are being retrieved? Thanks.
I'm pretty new at Access.
 
D

Duane Hookom

At least one reply in another group where you asked the same question.
Please don't post the same question to multiple groups.

Also, I would like to take this opportunity to once again suggest that you
normalize your table structure ;-)
 
B

bruch04

My apologies. I submitted this post before realizing which group I was
in. I tried cancelling it, and thought I had caught it in time, but I
guess not. Again, sorry about that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top