PSUIVERSON
Technical User
I have the following excerpt of some code:
Do
temp = rst!FIELD1
If temp Is Null Then
temp = 0
temp = FormatNumber(temp, 2)
rst.Edit
rst!FIELD1 = temp
rst.Update
ElseIf temp > 100 Then
temp = FormatNumber(rst!FIELD1 / 100, 2)
rst.Edit
rst!FIELD1 = temp
rst.Update
End If
rst.MoveNext
Loop Until rst.EOF
* I am trying to go through a table of 30k records or so and if there is nothing in the field then put it as "0" and show the number "0". Well right now about 80% of the fields are "NULL". When I run this temp = Null but when I toggle and look at the value in temp for the first IF CONDITION it skips right over it? Why doesn't that work? It's clearly NULL but it skips right over it.
Please help a rookie.
Do
temp = rst!FIELD1
If temp Is Null Then
temp = 0
temp = FormatNumber(temp, 2)
rst.Edit
rst!FIELD1 = temp
rst.Update
ElseIf temp > 100 Then
temp = FormatNumber(rst!FIELD1 / 100, 2)
rst.Edit
rst!FIELD1 = temp
rst.Update
End If
rst.MoveNext
Loop Until rst.EOF
* I am trying to go through a table of 30k records or so and if there is nothing in the field then put it as "0" and show the number "0". Well right now about 80% of the fields are "NULL". When I run this temp = Null but when I toggle and look at the value in temp for the first IF CONDITION it skips right over it? Why doesn't that work? It's clearly NULL but it skips right over it.
Please help a rookie.