John Bartow
john at winhaven.net
Fri Dec 5 13:58:05 CST 2003
Bobby, I've had a problem in the past using Project as a name in A97. Coul dbe a reserved word or something , I forget, but it is one of the reasons that compelled me to use Reddick's naming convention. I've never had a problem with tblProject :o) Just a thought JB > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Bobby Heid > Sent: Friday, December 05, 2003 1:27 PM > To: 'Access Developers discussion and problem solving' > Subject: [AccessD] Wierd tabledefs problem. > > > Hi all, > > We have some code that updates a BE table based upon a template > table. This > function has been working for about a million years. > > Anyway, after this function has updated some other tables, I go > to update a > particular table. When setting the tabledefs variable with > > Set tdfTarget = ldbTarget.TableDefs(lstrTableName) > > 'lstrTableName="Project" > > tdfTarget is Nothing after the assignment. > > Now, this function also will add the table if it does not exist in the BE. > So when the above line fails, it proceeds to add the table to the BE > tabledefs. Well, this fails because THE TABLE ALREADY EXISTS!!!! > > I can open a recordset against the particular table in the be using the > ldbTarget variable. I can also do a "? > ldbTarget.TableDefs("Project").name" > in the immediate window and it tells me that it is not in the collection. > But when I do a "? ldbTarget.TableDefs("Contracts").name", it prints out > Contracts. > > Anyone have any ideas as to what may be going on? > > This is in Access 97 SP-2. I have compacted and repaired the BE, used > JetComp on the BE and imported the BE into another MDB. > > Thanks, > Bobby > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > >