A
adammoo1984 via AccessMonster.com
Hi Guys,
Currently having issues trying to get the following to work:
Private Sub Label11_Click()
DoCmd.Echo False
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE Stores INNER JOIN Actions ON Stores.[Store No] = Actions.
[Store Number] SET Actions.[Date Works Required] = (Forms![Rebalance Update
Popup]![Start Date]-167) WHERE (((Actions.[Store Number])=Forms![Rebalance
Update Popup]![Store Number]) AND ((Actions.Action)=""RGIS Fee ordered""));"
MsgBox "All dates are now updated. Please check to see if any completed
tasks need re-doing (e.g. profile packs)", vbOKOnly, "Complete"
DoCmd.SetWarnings True
DoCmd.Echo True
End Sub
There are actually 12 update queries but they all follow the same format as
above. I need to take the dates which are shown on the form and change to
the date shown on a popup form +/- a number of days. Whenever I run this
currently it just clears all the dates on the form.
Anyone any ideas or questions? I'm a learner so be gentle.
Thanks,
Adam.
Currently having issues trying to get the following to work:
Private Sub Label11_Click()
DoCmd.Echo False
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE Stores INNER JOIN Actions ON Stores.[Store No] = Actions.
[Store Number] SET Actions.[Date Works Required] = (Forms![Rebalance Update
Popup]![Start Date]-167) WHERE (((Actions.[Store Number])=Forms![Rebalance
Update Popup]![Store Number]) AND ((Actions.Action)=""RGIS Fee ordered""));"
MsgBox "All dates are now updated. Please check to see if any completed
tasks need re-doing (e.g. profile packs)", vbOKOnly, "Complete"
DoCmd.SetWarnings True
DoCmd.Echo True
End Sub
There are actually 12 update queries but they all follow the same format as
above. I need to take the dates which are shown on the form and change to
the date shown on a popup form +/- a number of days. Whenever I run this
currently it just clears all the dates on the form.
Anyone any ideas or questions? I'm a learner so be gentle.
Thanks,
Adam.