Hi!
I am pulling my hair out over this one! Basically, I want the first control in my form (or the field that has a tab index of 0) to automatically receive the focus when a user clicks on a button. All fields are disabled by default, but when a user clicks on the 'Edit' button, all the fields are enabled so that the user can edit changes. The only problem is that all my form functions are automated using modules and I can't seem to get the first control on a form (or a field with a tab order of 0) to be given the focus, without specifying its name! I expect something below should work, but i'm not sure of the exact syntax.
Me.Controls(0).SetFocus ????
Me.TabIndex(0).SetFocus ????
Any help would be MUCH appreciated - thanks!
I am pulling my hair out over this one! Basically, I want the first control in my form (or the field that has a tab index of 0) to automatically receive the focus when a user clicks on a button. All fields are disabled by default, but when a user clicks on the 'Edit' button, all the fields are enabled so that the user can edit changes. The only problem is that all my form functions are automated using modules and I can't seem to get the first control on a form (or a field with a tab order of 0) to be given the focus, without specifying its name! I expect something below should work, but i'm not sure of the exact syntax.
Me.Controls(0).SetFocus ????
Me.TabIndex(0).SetFocus ????
Any help would be MUCH appreciated - thanks!