Call to code: "Comparison to with previous quarter:
GetConclusion2([MaxOfQ1],
[MaxOfQ1])"
Code:
Public Function GetConclusion2(MaxOfQ0, MaxOfQ1) As Variant
On Error GoTo ErrorExit
'Function to generates comparison of current quarter with previous quarter
based on Q0 and Q1
If MaxOfQ0 = Null & MaxOfQ1 = Null Then
GetConclusion2 = "Not sampled in 2 consecutive quarters"
ElseIf MaxOfQ0 = Null Then
GetConclusion2 = "Not sampled this quarter"
ElseIf MaxOfQ1 = Null Then
GetConclusion2 = "Not sampled previous quarter"
ElseIf Left(MaxOfQ0, 1) = "<" And Left(MaxOfQ1, 1) = "<" Then
GetConclusion2 = "Similar to last quarter"
ElseIf Left(MaxOfQ0, 1) = "<" And IsNumeric(MaxOfQ1) Then
GetConclusion2 = "Decrease since last quarter"
ElseIf IsNumeric(MaxOfQ0) And Left(MaxOfQ1, 1) = "<" Then
GetConclusion2 = "Increase since last quarter"
ElseIf MaxOfQ0 > MaxOfQ1 Then
GetConclusion2 = "Increase since last quarter"
ElseIf MaxOfQ0 < MaxOfQ1 Then
GetConclusion2 = "Decrease since last quarter"
ElseIf MaxOfQ0 = MaxOfQ1 Then
GetConclusion2 = "Similar to last quarter"
Else
End If
NormalExit:
Exit Function
ErrorExit:
GetConclusion2 = "Error"
'MsgBox Err.Description & " in module 'strGetQuarter'", vbExclamation,
"Error"
Resume NormalExit
End Function
John said:
Not without seeing the code and the call to the code.
'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
i'm stating this:
[quoted text clipped - 5 lines]
MaxOfQ0 and MaxOfQ1 are the same. The greater value get given to both
fields.
Any ideas why this is happening?