J
Jacqueline
I am trying to convert an Access 97 mdb file to 2000...I
got a compile error and when I run the debugger it stops
at this function...
It highlights the last section...RankCheck = result
....error states...Function call on lefthand side of
assignment must return Variant or Object.
Any ideas on what it should be changed to?
Public Function RankCheckOrig(current_value As Integer) As
Integer
Dim previous_value As Integer
Dim previous_rank As Integer
Dim result As Integer
previous_value = Forms![Rankvariables]![previous_value]
previous_rank = Forms![Rankvariables]![previous_rank]
If current_value <> 0 Then
If (previous_value = current_value) Then
result = previous_rank
Else
previous_rank = previous_rank + 1
Forms![Rankvariables]![previous_value] =
current_value
Forms![Rankvariables]![previous_rank] = previous_rank
result = previous_rank
End If
Else
result = 0
End If
RankCheck = result
End Function
got a compile error and when I run the debugger it stops
at this function...
It highlights the last section...RankCheck = result
....error states...Function call on lefthand side of
assignment must return Variant or Object.
Any ideas on what it should be changed to?
Public Function RankCheckOrig(current_value As Integer) As
Integer
Dim previous_value As Integer
Dim previous_rank As Integer
Dim result As Integer
previous_value = Forms![Rankvariables]![previous_value]
previous_rank = Forms![Rankvariables]![previous_rank]
If current_value <> 0 Then
If (previous_value = current_value) Then
result = previous_rank
Else
previous_rank = previous_rank + 1
Forms![Rankvariables]![previous_value] =
current_value
Forms![Rankvariables]![previous_rank] = previous_rank
result = previous_rank
End If
Else
result = 0
End If
RankCheck = result
End Function