G
Guest
I am receiving a type mismatch error when run the following code and am not
sure why, or how to fix it. Any help would be appreciated.
Dim dbs As Database
Dim tdf As TableDef
Dim fld As field
Set dbs = CurrentDb
Set tdf = dbs.TableDefs!tbl20YTmodelfinal
For Each fld In tdf.Fields *****error occurs here
Debug.Print "Max(Len(" & fld.Name & ")) as Max_" & fld.Name & ","
Next
sure why, or how to fix it. Any help would be appreciated.
Dim dbs As Database
Dim tdf As TableDef
Dim fld As field
Set dbs = CurrentDb
Set tdf = dbs.TableDefs!tbl20YTmodelfinal
For Each fld In tdf.Fields *****error occurs here
Debug.Print "Max(Len(" & fld.Name & ")) as Max_" & fld.Name & ","
Next