G
Guest
OK, I'm sure I've done this before, but I can't remember how. All I want to
do is get the list of field names from a table. The table will always be
called TEMP_IMPORT. Here's the code I have:
Dim objT As DAO.TableDef
Dim F As DAO.Field
Dim strCols As String
Set objT = CurrentDb.TableDefs("TEMP_IMPORT")
For Each F In objT.Fields
strCols = strCols & "," & F.Name
Next
Everytime I run it, I get an error message saying "Object is invalid or is
no longer set." It highlights the code "objT.Fields".
What am I doing wrong? I'm on Access2k, Windows2k. Thanks.
do is get the list of field names from a table. The table will always be
called TEMP_IMPORT. Here's the code I have:
Dim objT As DAO.TableDef
Dim F As DAO.Field
Dim strCols As String
Set objT = CurrentDb.TableDefs("TEMP_IMPORT")
For Each F In objT.Fields
strCols = strCols & "," & F.Name
Next
Everytime I run it, I get an error message saying "Object is invalid or is
no longer set." It highlights the code "objT.Fields".
What am I doing wrong? I'm on Access2k, Windows2k. Thanks.