K
kateri4482
I have the following code running from a command button, and it ignores the
section after the "&" sign in the strTableName statement, so it just gives me
a Table called tblBackupEnhancedCodes without the date. I can't figure out
what I am doing wrong. I want to run this periodically and create a backup
of a table but add the current date to the end of it.
Dim strTableName As String, strSQL As String
strTableName = "tblBaclupEnhancedCodes" & Format(Date, "ddmmmmyy")
strSQL = "Select tblEnhancedCodes.* Into " & strTableName & " From
tblEnhancedCodes;"
CurrentDB.Execute strSQL, dbFailOnError
I hope this makes sense and any assistance is appreciated.
section after the "&" sign in the strTableName statement, so it just gives me
a Table called tblBackupEnhancedCodes without the date. I can't figure out
what I am doing wrong. I want to run this periodically and create a backup
of a table but add the current date to the end of it.
Dim strTableName As String, strSQL As String
strTableName = "tblBaclupEnhancedCodes" & Format(Date, "ddmmmmyy")
strSQL = "Select tblEnhancedCodes.* Into " & strTableName & " From
tblEnhancedCodes;"
CurrentDB.Execute strSQL, dbFailOnError
I hope this makes sense and any assistance is appreciated.