Rocky Smolin
rockysmolin at bchacc.com
Wed Nov 5 11:26:24 CST 2014
Is this what you're looking for? http://allenbrowne.com/ser-49.html Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Wednesday, November 05, 2014 9:23 AM To: Access Developers discussion and problem solving Subject: [AccessD] Field Type In Access (2003), How can I get the Field Type, for a given Table Def Field Type integer? I used the following code to populate a table with field names and types for given tables: Set db = OpenDatabase(Path & mdbName) Set td = db.TableDefs(TableName) '**************************************** For Each fld In td.Fields strSQL = "INSERT INTO tblFieldsInISRRE (FieldName, FieldType, FieldSize, JunctFKID) VALUES ('" & fld.Name & "', '" & fld.Type & "', " & fld.Size & ", " & JunctPKID & ")" DoCmd.SetWarnings False DoCmd.RunSQL (strSQL) DoCmd.SetWarnings (True) Next Now when I query the table, I get everything that I need except the field type (Number, text...) Instead I get 10,12,15,20,3,4,5,8 (and that is sorted ascending?!?!?) Is there a sys table that I can join to, or make my own? Thanks, D -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com