[dba-Tech] List fields

Rocky Smolin at Beach Access Software rockysmolin at bchacc.com
Mon Oct 15 10:12:42 CDT 2007


Ooh. I think I know this one.


Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim fld As DAO.Field

Set db = DBEngine.OpenDatabase(gstrDatabaseName, False, False)
Set rs = db.OpenRecordset("MyTable")
For Each fld In rs.Fields
   	MsgBox fld.Name
Next fld
rs.Close
Set rs = Nothing 

I think...

Rocky



 	
	

-----Original Message-----
From: dba-tech-bounces at databaseadvisors.com
[mailto:dba-tech-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Monday, October 15, 2007 7:51 AM
To: Discussion of Hardware and Software issues
Subject: [dba-Tech] List fields

Would someone kindly remind me how to list all the fields in a given table?
Actually I need all the fieldnames from several tables, but I can do it one
at a time.

-- Memory is the second thing to go. I forget what the first is.
Arthur
_______________________________________________
dba-Tech mailing list
dba-Tech at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-tech
Website: http://www.databaseadvisors.com

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.488 / Virus Database: 269.14.10/1070 - Release Date: 10/14/2007
9:22 AM
 




More information about the dba-Tech mailing list