Loop through fields and update nulls to zero's
- From: "swedbera" <swedbera@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 4 Aug 2005 08:08:13 -0700
How would you loop through fields and update null values to zero's in vba?
If it was only one field, I would run a query or write an SQL statement.
I've seen many posts similar, but I can't get it to work. Here is my code.
With rst
Do Until .EOF
For I = 0 To rst.Fields.Count - 1
If rst.Fields(I).Value = Null Then
rst.Fields(I).Value = 0
rst.Update
End If
Next I
.MoveNext
Loop
.Close
End With
Please help me with this
Arlene
.
- Follow-Ups:
- RE: Loop through fields and update nulls to zero's
- From: Klatuu
- Re: Loop through fields and update nulls to zero's
- From: Allen Browne
- RE: Loop through fields and update nulls to zero's
- Prev by Date: object exists
- Next by Date: Re: Loop through fields and update nulls to zero's
- Previous by thread: object exists
- Next by thread: Re: Loop through fields and update nulls to zero's
- Index(es):
Relevant Pages
|