用ADO数据集容易解决,大体可以如下:
Dim rs As New adodb.Recordset
Dim i As Long
Dim mydate As Date
rs.Open "表名称", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
For i = 1 To rs.RecordCount
if isnull(rs("日期").value)=false then
mydate=rs("日期").value
else
rs("日期").value=mydate
end if
rs.MoveNext
Next
rs.Close