F
Fia
Hi
I wonder when I can use CurrentDb or when I have to make an object of type
Database.
I tried to use this code
Dim fld as Field
Dim tblDef as TableDef
Set tblDef = CurrentdB.TableDefs("Categories")
With tblDef
For Each fld In .Fields
Debug.Print " " & fld.Name & " " & fld.Type
Next
end With
,but I got the error 3420 "object invalid or no longer set"
Then I used an object of type Database and it worked.
Are there any prescriptions on when you can use CurrentDb and when you have
to make an object of type Database?
Thank's
Fia
I wonder when I can use CurrentDb or when I have to make an object of type
Database.
I tried to use this code
Dim fld as Field
Dim tblDef as TableDef
Set tblDef = CurrentdB.TableDefs("Categories")
With tblDef
For Each fld In .Fields
Debug.Print " " & fld.Name & " " & fld.Type
Next
end With
,but I got the error 3420 "object invalid or no longer set"
Then I used an object of type Database and it worked.
Are there any prescriptions on when you can use CurrentDb and when you have
to make an object of type Database?
Thank's
Fia