R
redrover
I need to create a backup of 2 tables before I perform a yearly maintenance
on this database. In the current world, new tables are manually created,
forms are changes, etc. I've automated everything except the copying of the
tables. I've tried using the following code to create the copy of the first
table but I get a message that my file cannot be found. What am I doing
incorrectly?
Dim strYear As String
Dim strDB As String
Dim cnn As ADODB.Connection
Set cnn = CurrentProject.Connection
strYear = Year(Date) - 1
strDB = strYear & "TeamMemberSummary"
DoCmd.TransferDatabase acImport, "Microsoft Access", "[071205 2007 Team
Member Summary.mdb]", acTable, "[tblTeamMemberSummary]", strDB
strDB is the name of the new table. I've tried multiple methods to identify
'071205 2007 Team Member Summary.mdb' but I get the same error message each
time.
on this database. In the current world, new tables are manually created,
forms are changes, etc. I've automated everything except the copying of the
tables. I've tried using the following code to create the copy of the first
table but I get a message that my file cannot be found. What am I doing
incorrectly?
Dim strYear As String
Dim strDB As String
Dim cnn As ADODB.Connection
Set cnn = CurrentProject.Connection
strYear = Year(Date) - 1
strDB = strYear & "TeamMemberSummary"
DoCmd.TransferDatabase acImport, "Microsoft Access", "[071205 2007 Team
Member Summary.mdb]", acTable, "[tblTeamMemberSummary]", strDB
strDB is the name of the new table. I've tried multiple methods to identify
'071205 2007 Team Member Summary.mdb' but I get the same error message each
time.