Does not work TextBox.SetFocus (Access) method, throws run-time error 2465
Essence: There is a form (fm_tbl_Rashod) and a subform (fm_tbl_Sostav_Rashod) related to each other through the main / subordinate field.
Using vba code, I change the fields in the table via recordset (everything is fine), but when validating and an error occurs (for example, if the field is empty or zero), I need to go to the field in the form to enter the required data. To do this, I use your help: hhttps://learn.microsoft.com/ru-ru/office/vba/api/access.textbox.setfocus where it is indicated that everything is simple, you need to do it like this: Forms! Employees! EmployeeID.SetFocus
However, I get an error: run-time error 2465! The vba code is executed from the button on the form, i.e. logically, the form remains active! How do I transfer focus to a form field from vba?
P.S. I wanted to write a question from Microsoft Edge, but when I try to write something in the form, the window freezes and reloads! I'm writing from Opera! How's that?!