Field count of a table with DAO 
Author Message
 Field count of a table with DAO

I am using DAO and need to get the field count of a
table.  I am using a TableDef and the field count keeps
returning 0 so I can not loop through the fields.

Thank you,

David



Wed, 07 Dec 2005 06:24:35 GMT  
 Field count of a table with DAO
hello

try open recordset like this...

Sub test()
     Dim rs
     Set rs = CurrentDb.OpenRecordset("libUnits")
     For i = 0 To rs.Fields.Count - 1
         Debug.Print rs.Fields(i).Name
     Next i
End Sub

Sguindaw

Quote:

> I am using DAO and need to get the field count of a
> table.  I am using a TableDef and the field count keeps
> returning 0 so I can not loop through the fields.

> Thank you,

> David

--
Sguindaw -> "gesteo onis: hacer que las cosas sean"


Wed, 07 Dec 2005 09:35:26 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Count across fields in a table

2. Count table fields with specific value in SCR8.

3. getting field count on an Access table

4. Using DAO to set field properties in tables.

5. add autonumber field to table using DAO

6. append fields to an existing table using DAO

7. Problem Formatting Table Fields through DAO

8. Adding a Field to an exsisting table in DAO

9. Create new fields in a table based off of fields in another table

10. Create new field in existing table exactly like field in second table

11. updating fields in table from field in another table

12. Fill field in one table from field in another table

 

 
Powered by phpBB® Forum Software