Pharcyde
Arriba Arriba!!!
- Local time
- Today, 13:54
- Joined
- Sep 4, 2003
- Messages
- 116
Heya All!
I have a little problem trying to assign a null value.
All I need really is the ability to assign a null value to a field if no mark is entered in a box.
At the moment, If the field is empty, FinalMark is assigned the value '0'.
I would like it to be blank.
is the function tat works properly. When I try to add:
I get 'Invalid Use of Null'
I suspect its the 'As Integer' part thats doing this, but I do not know the way around it!!
Please help!
LeeBoy
I have a little problem trying to assign a null value.
All I need really is the ability to assign a null value to a field if no mark is entered in a box.
At the moment, If the field is empty, FinalMark is assigned the value '0'.
I would like it to be blank.
Code:
Function FinalMark(Mark, Mark2, Mark3) As Integer
If Not IsNull(Mark3) Then
FinalMark = Mark3
Else
If Not IsNull(Mark2) Then
FinalMark = Mark2
Else
If Not IsNull(Mark) Then
FinalMark = Mark
End If
End If
End If
End Function
is the function tat works properly. When I try to add:
Code:
Else If IsNull(Mark) Then
FinalMark = Null
EndIf
I get 'Invalid Use of Null'

I suspect its the 'As Integer' part thats doing this, but I do not know the way around it!!
Please help!

Last edited by a moderator: