D
Dale Fye
I must be having a brain cramp. The following code is generating a run-time
error 3420: Object invalid or no longer set.
The line that is marked with the asterisk is the one generating the error.
When I add error handling, it still errors when I try to print the tdf.name
to the debug window, not when on the Set tdf = ... line.
Public Sub test()
Dim tdf As DAO.TableDef
Set tdf = CurrentDb.TableDefs("tbl_Groups")
Debug.Print tdf.Name
Debug.Print tdf.Fields.Count
Set tdf = Nothing
End Sub
Dale
error 3420: Object invalid or no longer set.
The line that is marked with the asterisk is the one generating the error.
When I add error handling, it still errors when I try to print the tdf.name
to the debug window, not when on the Set tdf = ... line.
Public Sub test()
Dim tdf As DAO.TableDef
Set tdf = CurrentDb.TableDefs("tbl_Groups")
Debug.Print tdf.Name
Debug.Print tdf.Fields.Count
Set tdf = Nothing
End Sub
Dale