I have a database of about 80 tables, each of which has a "GUID" field. I want to delete these fields, but this is not permitted by Access. The alternative seems to be to run a "make table" query on each table leaving out this field. I want to automate this somehow, as the manual version would be extremely tedious.
I thought that something like:
I don't really know what the code in the "If" statement would be.
Does anyone have any idea?
I thought that something like:
Code:
tblCount = 0
tblNotFound = False
Dim DBName As String
Dim DBase As Database
Set DBase = CurrentDb
Do Until tblNotFound
DBName = DBase.TableDefs(tblCount).Name
'All the tables have the prefix "tbl"
If Left(DBName, 3) = "tbl" Then
'run a "make table" query for this table which copies all the fields
'except the "GUID" field and puts on a prefix
End If
tblCount = tblCount + 1
If DBase.TableDefs.Count = tblCount Then
tblNotFound = True
End If
Loop
I don't really know what the code in the "If" statement would be.
Does anyone have any idea?