Change it by referencing tblDeployment instead of tblLocation under the field name in the query design grid.
Because of the "On Error Resume Next" line. The procedure errors but overrides the error message and continues to execute. The LocationID field value is not changed. Disable that line and you will get error message.