Dim mRS as recordset
Dim defaultVal as string
defaultVal = "Some Value"
Set mRS = currentdb.OpenRecordset(myTablename)
With mRS
.movefirst
While not .EOF
if Not IsNull(.fields(fieldname)) then
'if the field has a value then assing value to
variable
defaultVal = .fields(fieldname)
Else
'If field value is empty then assign variable
value to field
.Edit
.fields(fieldname) = defaultVal
.Update
End if
.movenext
Wend
End With
mRS.close
set mRS = Nothing
- - - Dean
>.
>