I want to compare a table that contains 8 fields to all the tables in my database to determine which tables contain all 8 of those fields.
Unfortunately I can't visualize the code. What I have so far starts with:
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Dim cpRst As DAO.Recordset 'Account Field Comparison Table
Dim cpFld As DAO.Field 'Account Table (Field Name)
Set db = CurrentDb
Set cpRst = db.OpenRecordset("tblCompareAcctFlds")
For Each tdf In db.TableDefs
If Left(tdf.Name, 3) = "HTE" Then
If tdf.SourceTableName = "" Then
For Each fld In tdf.Fields
Do While Not cpRst.EOF
If cpFld.Name <> fld.Name Then
End If
End If
Next tdf
End Sub
I assume I will need to enumerate the results of the field name comparison code but I don't know how to do this.
Any help is appreciated.
Thanks!
Unfortunately I can't visualize the code. What I have so far starts with:
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Dim cpRst As DAO.Recordset 'Account Field Comparison Table
Dim cpFld As DAO.Field 'Account Table (Field Name)
Set db = CurrentDb
Set cpRst = db.OpenRecordset("tblCompareAcctFlds")
For Each tdf In db.TableDefs
If Left(tdf.Name, 3) = "HTE" Then
If tdf.SourceTableName = "" Then
For Each fld In tdf.Fields
Do While Not cpRst.EOF
If cpFld.Name <> fld.Name Then
End If
End If
Next tdf
End Sub
I assume I will need to enumerate the results of the field name comparison code but I don't know how to do this.
Any help is appreciated.
Thanks!