C
Christian
Hi NG,
I'm trying to get below code to work:
Private Sub SetExcelPath_Click()
'Update an existing record.'
DoCmd.SetWarnings False
Sql = "UPDATE TblUserSettings SET TblUserSettings.ExportExcelPath=" &
Me.ExportExcelPath & " " & "WHERE (((TblUserSettings.RowID)=1));"
DoCmd.RunSQL Sql
DoCmd.SetWarnings True
End Sub
My problem is getting the SQL string right. I believe above code would work
if I just could get the string to be:
UPDATE TblUserSettings SET TblUserSettings.ExportExcelPath="C:\users\excel\"
WHERE (((TblUserSettings.RowID)=1));
But the code gives me:
UPDATE TblUserSettings SET TblUserSettings.ExportExcelPath=C:\users\excel\
WHERE (((TblUserSettings.RowID)=1));
ie the "" marks are missing around the path C:\users\excel.
I've tried different combinations but can't get the quotations marks in
place.
Any suggestions are warmly welcome.
- Chr
I'm trying to get below code to work:
Private Sub SetExcelPath_Click()
'Update an existing record.'
DoCmd.SetWarnings False
Sql = "UPDATE TblUserSettings SET TblUserSettings.ExportExcelPath=" &
Me.ExportExcelPath & " " & "WHERE (((TblUserSettings.RowID)=1));"
DoCmd.RunSQL Sql
DoCmd.SetWarnings True
End Sub
My problem is getting the SQL string right. I believe above code would work
if I just could get the string to be:
UPDATE TblUserSettings SET TblUserSettings.ExportExcelPath="C:\users\excel\"
WHERE (((TblUserSettings.RowID)=1));
But the code gives me:
UPDATE TblUserSettings SET TblUserSettings.ExportExcelPath=C:\users\excel\
WHERE (((TblUserSettings.RowID)=1));
ie the "" marks are missing around the path C:\users\excel.
I've tried different combinations but can't get the quotations marks in
place.
Any suggestions are warmly welcome.
- Chr