Hi guys,
I am currently stuck on this SQL command that seems to giving me no sense of answer..
The SQL is this:
INSERT INTO DatabaseBackupHistory(SourceFilePath,SourceDatabas eFileName,BackupFilePath,BackupDatabaseFileName,Ba ckupDatabaseDate,User,Activity) VALUES('" & Forms!Switchboard!CurrentPage!DefineSubForm!txtFil eURL & "','" & Forms!Switchboard!CurrentPage!DefineSubForm!txtfil ename & "','" & Forms!Switchboard!CurrentPage!DefineSubForm!txtFil ePathSave & "','" & Forms!Switchboard!CurrentPage!DefineSubForm!txtSav eFileName & "','" & Now & "','" & Forms!Login!activeuser & "','Back-ups " & Me.txtfilename & " database')"
The error message is:
Syntax error (missing operator) in query expression
"Some source file path\CurrentProject.accdb','CurrentProject.accdb".
Then I tried fixing/removing the double quotes, but whenever no error is found and the SQL is run by DoCmd.RunSQL the problem then is that it stores exactly the Now method and the activeuser but the rest are not.
Do anyone have idea what could be the problem? Thanks in advance...
I am currently stuck on this SQL command that seems to giving me no sense of answer..
The SQL is this:
INSERT INTO DatabaseBackupHistory(SourceFilePath,SourceDatabas eFileName,BackupFilePath,BackupDatabaseFileName,Ba ckupDatabaseDate,User,Activity) VALUES('" & Forms!Switchboard!CurrentPage!DefineSubForm!txtFil eURL & "','" & Forms!Switchboard!CurrentPage!DefineSubForm!txtfil ename & "','" & Forms!Switchboard!CurrentPage!DefineSubForm!txtFil ePathSave & "','" & Forms!Switchboard!CurrentPage!DefineSubForm!txtSav eFileName & "','" & Now & "','" & Forms!Login!activeuser & "','Back-ups " & Me.txtfilename & " database')"
The error message is:
Syntax error (missing operator) in query expression
"Some source file path\CurrentProject.accdb','CurrentProject.accdb".
Then I tried fixing/removing the double quotes, but whenever no error is found and the SQL is run by DoCmd.RunSQL the problem then is that it stores exactly the Now method and the activeuser but the rest are not.
Do anyone have idea what could be the problem? Thanks in advance...