Z
ZIMMJE
I CONTINUE TO GET COMPILE ERROR: END IF WITHOUT BLOCK IF!!!! CAN ANYONE TELL
ME WHAT IS WRONG?
Sorry so long I wanted to provide the detail --
In a query I have the following:
PPTE: ResultCalc([Episodes]![ACUT_ETG_IND],[Episodes]![Days_IND])
The following is performed when the ResultCalc function is called:
Function ResultCalc(EPTG_ACUT_ETG_IND As Double, Vec_rlpte_Dys_Qty As
Double) As Double
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 0) And
(Vec_rlpte_Dys_Qty <= 30) Then ResultCalc = 0.5434 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 31) And
(Vec_rlpte_Dys_Qty <= 60) Then ResultCalc = 0.6769 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 61) And
(Vec_rlpte_Dys_Qty <= 90) Then ResultCalc = 0.7579 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 91) And
(Vec_rlpte_Dys_Qty <= 120) Then ResultCalc = 0.8168 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 121) And
(Vec_rlpte_Dys_Qty <= 150) Then ResultCalc = 0.8592 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 151) And
(Vec_rlpte_Dys_Qty <= 180) Then ResultCalc = 0.898 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 181) And
(Vec_rlpte_Dys_Qty <= 210) Then ResultCalc = 0.9257 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 211) And
(Vec_rlpte_Dys_Qty <= 240) Then ResultCalc = 0.9473 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 241) And
(Vec_rlpte_Dys_Qty <= 270) Then ResultCalc = 0.9646 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 271) And
(Vec_rlpte_Dys_Qty <= 300) Then ResultCalc = 0.9788 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 301) And
(Vec_rlpte_Dys_Qty <= 330) Then ResultCalc = 0.9908 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 331) And
(Vec_rlpte_Dys_Qty <= 365) Then ResultCalc = 1
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End Function
Thank you,
JZ
ME WHAT IS WRONG?
Sorry so long I wanted to provide the detail --
In a query I have the following:
PPTE: ResultCalc([Episodes]![ACUT_ETG_IND],[Episodes]![Days_IND])
The following is performed when the ResultCalc function is called:
Function ResultCalc(EPTG_ACUT_ETG_IND As Double, Vec_rlpte_Dys_Qty As
Double) As Double
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 0) And
(Vec_rlpte_Dys_Qty <= 30) Then ResultCalc = 0.5434 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 31) And
(Vec_rlpte_Dys_Qty <= 60) Then ResultCalc = 0.6769 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 61) And
(Vec_rlpte_Dys_Qty <= 90) Then ResultCalc = 0.7579 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 91) And
(Vec_rlpte_Dys_Qty <= 120) Then ResultCalc = 0.8168 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 121) And
(Vec_rlpte_Dys_Qty <= 150) Then ResultCalc = 0.8592 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 151) And
(Vec_rlpte_Dys_Qty <= 180) Then ResultCalc = 0.898 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 181) And
(Vec_rlpte_Dys_Qty <= 210) Then ResultCalc = 0.9257 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 211) And
(Vec_rlpte_Dys_Qty <= 240) Then ResultCalc = 0.9473 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 241) And
(Vec_rlpte_Dys_Qty <= 270) Then ResultCalc = 0.9646 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 271) And
(Vec_rlpte_Dys_Qty <= 300) Then ResultCalc = 0.9788 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 301) And
(Vec_rlpte_Dys_Qty <= 330) Then ResultCalc = 0.9908 Else
If (EPTG_ACUT_ETG_IND = 0) And (Vec_rlpte_Dys_Qty >= 331) And
(Vec_rlpte_Dys_Qty <= 365) Then ResultCalc = 1
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End Function
Thank you,
JZ