You're welcome.
The reason I thought that might be the case is because of all the time I wasted learning this lesson the hard way ;-) -- Marsh MVP [MS Access]
kateri4482 wrote:
[Quoted Text] >That is exactly the case. When I originally set up the table I had a field >called "Date" until I realized that is not a good idea, so I created a new >field but forgot to delete the old one. Thanks for the help! > >"Marshall Barton" wrote: > >> kateri4482 wrote: >> >> >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;" >> >> >> You probably have a text box named Date and its value is >> Null. >> >> If so, it's just another reminder not to use reserved words >> when you make up names.
|