Sylvain, I should of been more clearer....this actually is my questions:
This is what I am trying to accomplish:
I am tracking patients on a once every 3 Month basis after an initial
assessment. If they "Pass" two visits in a row they will no longer be
tracked. But I want to capture the patients who have not "Passed" until
they
do "Pass" (again they have to pass two visits in a row.)
I am not sure if my tables are set up correctly, but this is what I have:
I have two tables; First table tblInitialSettings: InitialDate (Date
field),
InitialResult(pass/fail). Second table tblFollowUp: FollowUpDate (Date
Field), FollowUpType (cboBox w/"3 Month", "6 Month", "9 Month",.......,"4
Years", FollowUpResult (Pass/Fail).
I have been trying to write IIF Statements but I get no where. For
example:
IIF(IIF([InitialResult]="Pass" and IIF([FollowUpType] = "3 Month" and
IIF([FollowUpResult]="Pass")))........
I am confused. Again, I may have set up my tables wrong. Short of just
putting check boxes on my forms that state "3 Month Follow Up Pass"/"3
Month
Follow Up Fail" I am at a loss
Thanks for your time, Ryan
Sylvain Lafontaine said:
You are using [CPR_Tracking.Week_Ending] both as a numeric value (by
substracting 7) and a string value (by comparing to "NP"). Things to
verify:
1- Make sure that [CPR_Tracking.Week_Ending] is a numeric value. Set an
explicit cast with CInt() or CLng() is necessary.
2- Make sure that none of these fields is null. Use Nz() if necessary.
3- Add parenthesis around « CPR_Tracking.Week_Ending] - 7 » (Not sure of
this last one but I don't have the time to verify the order of precedence
for the mathematical/logical operators under VBA.)
S. L.
Ryan W said:
What did you do to get it to work? I am having same difficulty. Thanks
for
your time, Ryan
:
Sorry...I managed to figure this one out myself. Thanks anyways.
:
I can't figure out why I am getting the "#Error" result in my query.
This is
the source of that field:
Problem?:
IIf([Daily_Tracking.Day_Worked]<=[CPR_Tracking.Week_Ending]
And
[Daily_Tracking.Day_Worked]>=[CPR_Tracking.Week_Ending]-7 AND
[CPR_Tracking.Week_Ending]<> "NP","No","Yes")
It returns the "Yes" value fine, but it won't return a "no" value,
instead
of "no" I get the "#Error". Please help. Thanks.