Change name of field throughout database

dsajones

Registered User.
Local time
Today, 20:16
Joined
Jan 22, 2011
Messages
47
Hi All,

I've taken over a database where the original developer created a field called Date in the main table. I'm having all sorts of problems in code where I try to do things with date as it's a reserved word. So I would really like to rename it to something like CallDate. Is there a quick and clever way of finding every Query, form and report that references this field and rename it?

Cheers
David
 
What version of Access are you using?

You can go to settings and use the Auto Correct facility. Then do a find and replace in you code modules across the whole project.
 
Hi David,

I'm developing in Access 2007 although the database runs under 2003. How will the auto-correct help? I can do a find and replace OK in the code modules but it's anywhere that the field is used in a form or a report or a query that concerns me.

Cheers
David
 
When autocorrect is switched on and design a table to change a field name Access trwls though your app and changes the name for you. I have it switched off for other reasons but this is what is supposed to happen. Access also creates an Auto Correct table and lists the places where ithas changed them.
 
That's brilliant, thanks David. I was looking at the Spelling autocorrect options. Found it now, thanks.

Cheers
David
 

Users who are viewing this thread

Back
Top Bottom