Work in A2003 and A2007.
How do we guarantee that the selected TextBox gets focus when loading the form? If we put MyTextBox.SetFocus in Form_Load, we get an error:
can't move the focus to the control
This form is designed for quick data entry, and the form is somewhat rebuilt based on the latest settings used. Thus, there are several different text fields that may need focus depending on the user. We cannot just fix this during development by setting MyTextBox TabIndex = 0.
The help talks about a redraw call, which just doesn't make any sense:
You can only move focus until visible control or shape. The form and controls on the form are not visible until the Load finished event appears. Therefore, if you use the SetFocus Method in the Load event form to move the focus to this form, you must use the Repaint method before the SetFocus Method.
You cannot set the focus because the controls do not exist yet, try entering the code in the OnActivate event instead
Or just put DoCmd.Repaint in the OnLoad event before trying to set focus. Both should work, but I'm not near the computer to check
, 0 Index Index.
, , , , 1) , 2) . , , (, , ).
.SetFocus . , - , , .
, , , header/footer , . , "" , , SetFocus. , , .
SetFocus On . , , , , Allow Additions . SetFocus, .
Source: https://habr.com/ru/post/1794699/More articles:using pyserial flush method - pythonWPF - ΠΡΠΊΡΡΡΡ ContextMenu Π»Π΅Π²ΠΎΠΉ ΠΊΠ½ΠΎΠΏΠΊΠΎΠΉ ΠΌΡΡΠΈ - .netMyfaces Trinidad JSF: ΠΏΡΠΎΠ±Π»Π΅ΠΌΠ° Ajax ΠΏΡΠΈ ΠΎΡΠΏΡΠ°Π²ΠΊΠ΅ ΡΠΈΠΌΠ²ΠΎΠ»ΠΎΠ² Non US-ASCII - jsfΠΡΠΎΠ±Π»Π΅ΠΌΠ° Matlab nchoosek - performanceGenerating compiler code for expressions with multiple operands - cΠΠ°ΠΊ Π½Π°ΠΉΡΠΈ ΠΈΠΌΠ΅Π½Π° ΡΠΎ ΡΠΏΠ΅ΡΠΈΠ°Π»ΡΠ½ΡΠΌΠΈ ΡΠΈΠΌΠ²ΠΎΠ»Π°ΠΌΠΈ ΡΠΈΠΏΠ° "Π₯ΠΎΡΠ΅" Π½Π° MS SQL-Server - sqlDuplicate entry created, but why? (linq to sql) - c #Hidden window screenshot - windowsadd image to html or radio input element - htmlDoes VBA have an ATan2 feature? - vbaAll Articles