Vulcan1500
Registered User.
- Local time
- Today, 22:21
- Joined
- Nov 13, 2007
- Messages
- 143
I'm trying to write a SQL statement to fill a table with the backup files as stored in the backup folder. I managed to create the table tblBackup with the fields strBackupName and dtmBackupDateTime. The names of the backup file are: Backup with the date and time of the backup added. I'm able to read the backup files and store the name of the file in strBackupName and to derive the date and time from the name and store this in dtmBackupDateTime.
Example:
strBackupName='Backup 31-12-2007 08:30:05'
dtmBackupDateTime=#12/31/2007 08:30:05#
My problem now is to insert strBackupName and dtmBackupDateTime in tblBackup. To do this I'm using the following statement:
When this statement is executed ACCESS is asking via a messagebox to input strBackupName and dtmBackupDateTime. It does not accept the variables!
Pls help me with this problem.
Example:
strBackupName='Backup 31-12-2007 08:30:05'
dtmBackupDateTime=#12/31/2007 08:30:05#
My problem now is to insert strBackupName and dtmBackupDateTime in tblBackup. To do this I'm using the following statement:
Code:
DoCmd.RunSQL "INSERT INTO tblBackup ([strBackupName], [dtmBackupDateTime]) VALUES (strBackupName, dtmBackupDateTime);"
When this statement is executed ACCESS is asking via a messagebox to input strBackupName and dtmBackupDateTime. It does not accept the variables!