代码:
Sub test()
Dim res As ADODB.Recordset
Dim i As Integer
Set res = New ADODB.Recordset
res.Open "Data", CurrentProject.Connection, adOpenDynamic, adLockOptimistic
res.MoveFirst
Do While Not res.EOF
With res
For i = 1 To 10
If IsNull(.Fields(i & "月")) Then
.Fields(i & "月") = 0
End If
Next i
.MoveNext
End With
Loop
End Sub