John Skolits
askolits at nni.com
Mon Oct 1 11:56:10 CDT 2007
Actually tried that. Same error. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of McGillivray, Don [IT] Sent: Monday, October 01, 2007 12:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Adding Caption Property Shot in the dark here, but maybe you have to create the caption property for the field BEFORE appending the field to the table. Don -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Skolits Sent: Monday, October 01, 2007 8:47 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Adding Caption Property My objective is to simply add a caption to all my table fields. I'm sure I'm missing something basic here. I went to many archives and all the solution seemed similar, but it still won't work for me. Can anyone tell me what's wrong? Dim dbCurr As Dao.Database, tdf As Dao.TableDef, fld As Dao.Field Dim prop As Dao.Property 'Create Table (This Works) Set dbCurr = CurrentDb() Set tdf = dbs.CreateTableDef("tbl_TEST") 'Create Field (This Works) Set fld = tdf.CreateField("Test Field" ,dbtext, 255) tdf.Fields.Append fld 'Create the CAPTION property. (This line is accepted) Set prop = fld.CreateProperty("Caption", dbText, "Test Caption") 'Append the property (Breaks Here) fld.Properties.Append prop Error: Run-time error '3219' - Invlaid operation. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com