Hi,
I am trying to run an Update Sql code line where the destination in the table is variable, however I just cannot quite get there. The line of code that I am using is:
The issue appears to be in the destination as when I change it to a set location, eg ManagerDiary, ReceptionDiary etc then it works, however I just cannot make the variable work, I have tried many variations over the last few days including the following:
#[Forms]![frmBackground]![subfrmHome]![txtDiaryFeed]#
#" & [Forms]![frmBackground]![subfrmHome]![txtDiaryFeed] & "#
' & [Forms]![frmBackground]![subfrmHome]![txtDiaryFeed] & '
& " [Forms]![frmBackground]![subfrmHome]![txtDiaryFeed] " &
& [Forms]![frmBackground]![subfrmHome]![txtDiaryFeed] &
Thank you, Malcolm
I am trying to run an Update Sql code line where the destination in the table is variable, however I just cannot quite get there. The line of code that I am using is:
Code:
DoCmd.RunSQL "UPDATE tbl_Net_Diary SET & [Forms]![frmBackground]![subfrmHome]![txtDiaryFeed] & = [Forms]![frmBackground]![subfrmHome]![txtDiaryEdit] WHERE TheDate = #" & [Forms]![frmBackground]![txtLocalSystemDate] & "#"
The issue appears to be in the destination as when I change it to a set location, eg ManagerDiary, ReceptionDiary etc then it works, however I just cannot make the variable work, I have tried many variations over the last few days including the following:
#[Forms]![frmBackground]![subfrmHome]![txtDiaryFeed]#
#" & [Forms]![frmBackground]![subfrmHome]![txtDiaryFeed] & "#
' & [Forms]![frmBackground]![subfrmHome]![txtDiaryFeed] & '
& " [Forms]![frmBackground]![subfrmHome]![txtDiaryFeed] " &
& [Forms]![frmBackground]![subfrmHome]![txtDiaryFeed] &
Thank you, Malcolm