This will loop 'all' tables seeking the offending field and change it for the 'current' database Jim..... but I'm a little confused as to the 'all over the state' bit you speak about where is the table located obviously this code below does not target external databases in any logical sweep merely the current one?
- Dim db As DAO.Database
-
Dim tbl As DAO.TableDef
-
Dim fld As DAO.Field
-
Set db = CurrentDb()
-
For Each tbl In db.TableDefs
-
For Each fld In tbl.Fields
-
If fld.Name = "MapDatum" Then fld.Name = "Datum"
-
Next
-
Next
-
Regards
Jim :)
That will do nicely thanks Jim. "All over the state" means just that, on computers all over the state of Victoria, Australia. It's a front end/back end setup where the back ends are located
on each and every users C:\ drive!
Please, don't look at me like that, I didn't design it.
The back ends do get sent in to the head office periodically and this is coming up soon so I'm writing a little fixer-upper code for the poor woman who administers this mess.
Thanks for the code, I was actually getting pretty close. I can cut down one of the loops because I know what table I'm going to look at.
Jim