Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

renaming tables

Status
Not open for further replies.

JeroenNL

Programmer
Nov 28, 2002
217
NL
Hi there,

I have a bunch of linked tables which are being used in a lot of queries. I now need to rename lots of these tables.

I thought Access would update all queries that use a specific table when I rename that table (so that the queries use the new tablename). But this doesn't seem to be true. Am I doing something wrong?


Bye,
Jeroen

A 3d level editor in Delphi
 
Jeroen

No, you're not doing anything wrong at all. Access doesn't do this as I know from experience. :-(
You will also need to go through and change any references to tables in VBA code, macros, lookup tables etc.

John
 
Thanks for your reply John, but I think that's pretty strange! I have seen Access updating a simple query when I changed the name of the table that was being used by that query.

Simply make a table called "Table1" with some bogus data and a query called "Query1" that selects some data from Table1. Now rename Table1 to Table2 and re-open the query in design view. You'll see that the name of the table has been changed also. At least, that's what it does here.

Problem is that Access doesn't seem to do this for all queries... :-( Anyone knows what's going on?


Bye,
Jeroen

A 3d level editor in Delphi
 
Whenever I have done this with applications, the queries have been fairly complex (unions, group by's, correlated subqueries and several table joins, hand crafted SQL rather than wizard generated) but they were access queries, not pass through.

John
 
Yeah, I think it must have something to do with the complexity of the queries. Simple select queries are being updated most (!) of the time, but more complex queries aren't being updated at all...

Bye,
Jeroen

A 3d level editor in Delphi
 
Go get a copy of Find n Replace, by Rick Fisher. You can get it at RickWorld.com. It's $37, and it will recover that amount of money for you the first time you use it for something like this.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top