I cannot figure out what I am doing wrong. I am trying to write a query to put a "1" UNDER "POS_OTHER" when a culture (CULTUREDATE) is between [ADMIT_DATE] AND [DC_DATE]. All 3 date fields are formatted as vb general date/time, but there are many instances being missed (see screenshot).
[IMGNOTHUMB]http://bytes.com/attachments/attachment/7584d1397229721/access_dates.jp g[/IMGNOTHUMB]
Code:
SELECT Neg_on_admit_dates_formatted.REPID, Neg_on_admit_dates_formatted.ADMIT_DATE, Neg_on_admit_dates_formatted.DC_DATE, Neg_on_admit_dates_formatted.CULTUREDATE, IIf([CULTUREDATE] Between [ADMIT_DATE] And [DC_DATE],1,Null) AS POS_OTHER FROM Neg_on_admit_dates_formatted;
Comment