Hello:
I use the VBA (see below) to strip off a "prefix" ("00_LK_) from multiple tables.
Code:
For Each tdf In dbs.TableDefs
If tdf.Name Like "00_LK_*" Then
tdf.Name = "LK_" & Mid(tdf.Name, 7, 255)
m = m + 1
End If
Next
Thus, any tables starting with "00_LK_Table_*" will be renamed to "LK_Table_*".
Using the same logic, how would I strip off a suffix = "_Step_4"? So, a table named "tbl_INJURY_Step_4" would be changed to "tbl_INJURY" while "tbl_ILLNESS_Step_4" would be renamed to "tbl_ILLNESS"?
Thanks!