type mismatch error

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top