Hello,
I am trying to update a field in a table, the field to update is variable based upon what the user selects on a form, but the field to update is created in a textbox - its a mixture of the day of the week selected and the name of the field to update, so at the moment I am trying to update EarlyDutyManagerTuesday field. (It will be able to update the fields LateDutyManager, EarlyReception, LateReception etc and they also all end in Monday, Tuesday etc.
I am getting the error of '3073: Operation must use an updateable query'
I have tried the following which would give me the variable place to put my update:
If I can get this above to work then it will look more like this, so it updates from a textbox:
The following works but is not variable:
Thank you for your help in advance.
Malcolm
I am trying to update a field in a table, the field to update is variable based upon what the user selects on a form, but the field to update is created in a textbox - its a mixture of the day of the week selected and the name of the field to update, so at the moment I am trying to update EarlyDutyManagerTuesday field. (It will be able to update the fields LateDutyManager, EarlyReception, LateReception etc and they also all end in Monday, Tuesday etc.
I am getting the error of '3073: Operation must use an updateable query'
I have tried the following which would give me the variable place to put my update:
Code:
DoCmd.RunSQL "UPDATE tbl_Net_TicketDays SET Forms!frmBackground!subfrmTickets!txtTableFieldDay = 'TESTx1'"
DoCmd.RunSQL "UPDATE tbl_Net_TicketDays SET [Forms]![frmBackground]![subfrmTickets]![txtTableFieldDay] = 'TESTx1'"
If I can get this above to work then it will look more like this, so it updates from a textbox:
Code:
DoCmd.RunSQL "UPDATE tbl_Net_TicketDays SET [Forms]![frmBackground]![subfrmTickets]![txtTableFieldDay] = txtMonday"
The following works but is not variable:
Code:
DoCmd.RunSQL "UPDATE tbl_Net_TicketDays SET EarlyDutyManagerMonday = 'TEST'"
Thank you for your help in advance.

Malcolm