'code to loop though all field in table one'
Dim db As DAO.Database
Set db = CurrentDb
Dim rs As Recordset
Set rs = db.OpenRecordset("table1")
While Not rs.EOF
'if there is no record where the fieldname not is null then insert data to another table (replace text between < > by what you need'
If IsNull(DLookup(rs("FieldName"), rs("TableName"), "NOT " & rs("FieldName") & " IS NULL")) Then
DoCmd.RunSQL ("INSERT INTO (TableName, ) VALUES('" & rs("TableName") & "', '" & rs("FieldName") & " IS NULL')")
End If
rs.MoveNext
Loop
'code to het the field type
Dim db As DAO.Database
Set db = CurrentDb
Dim tdf As DAO.TableDef
Set tdf = db.TableDefs()
Dim fld As field
Set fld = tdf()
fld.Yype
|