我有一个包含多个字段的访问表。我想通读所有行、所有字段,如果该字段包含 NULL,则设置默认值“”。我正在尝试使用字段定义通读表格,但无法找到该字段的现有值。
Dim fld As DAO.Field
Dim t As DAO.TableDef
Dim fldVal as string (test variable to see if I can find value of field)
For Each t In cd.TableDefs
If t.Name = "PERSONS" Then
For Each fld In t.Fields
Just trying to find the existing value here
fldVal = fld.Value
If fld.Type = 10 And IsNull(fld) = True Then
fld.Value = ""
End If
Next
End If
Next