B
Beginner
Hi!
I'm using Access 2003. In my database I make tables from sum queries so that
I have a sum query table for every working day of a month. Once a month I
make a backup of my database (backend file), and after making the backup I
would like to delete the sum tables from the original backend. I name the
tables as "Sum_yyyy_mm_dd", so that every table always has the "Sum" in its
name.
My problem is that I don't know how to see if a table's name starts with
"Sum". This is what I have:
Dim i As Integer
Dim strTablename As String
Dim db As Database
Set db = OpenDatabase("here is the path to the backend")
With db.TableDefs
For i = 0 To (.Count - 1)
strTableName = ? 'I'd like to have the name of the table to
strTablename
If strTablename Like "Sum*" Then
.Delete strTablename
End If
Next i
End With
I'd be glad if someone could point me to the right direction!
- Beginner -
I'm using Access 2003. In my database I make tables from sum queries so that
I have a sum query table for every working day of a month. Once a month I
make a backup of my database (backend file), and after making the backup I
would like to delete the sum tables from the original backend. I name the
tables as "Sum_yyyy_mm_dd", so that every table always has the "Sum" in its
name.
My problem is that I don't know how to see if a table's name starts with
"Sum". This is what I have:
Dim i As Integer
Dim strTablename As String
Dim db As Database
Set db = OpenDatabase("here is the path to the backend")
With db.TableDefs
For i = 0 To (.Count - 1)
strTableName = ? 'I'd like to have the name of the table to
strTablename
If strTablename Like "Sum*" Then
.Delete strTablename
End If
Next i
End With
I'd be glad if someone could point me to the right direction!
- Beginner -