WalterInOz
Registered User.
- Local time
- Tomorrow, 01:07
- Joined
- Apr 11, 2006
- Messages
- 93
I have an unbound textfield (txtGoTo) on my form in which users are only allowed to enter 4 digits, not more, not less. This is controlled by the input mask for that field and works just fine. However, there are a few things that I would like to improve to make it more user-friendly.
When I open the form I'd like the cursor to be in the txtGoTo field with the 4 placeholders blacked-out (selected) so that you can immediately enter the 4 digit number, press enter and off you go to the next form displaying the correct record.
At the moment I have me.txtGoTo.setfocus in the "on open" event but that doesn't do the trick. Also I don't see how you can code for the focus to shift automatically from the txtGoTo field to the button btnGo once the 4 digits have been entered.
I'm thinking along these lines:
If me.txtGoTo.value = 4 then
me.btnGo.setfocus
end if
But that doesn't work. What would?
When I open the form I'd like the cursor to be in the txtGoTo field with the 4 placeholders blacked-out (selected) so that you can immediately enter the 4 digit number, press enter and off you go to the next form displaying the correct record.
At the moment I have me.txtGoTo.setfocus in the "on open" event but that doesn't do the trick. Also I don't see how you can code for the focus to shift automatically from the txtGoTo field to the button btnGo once the 4 digits have been entered.
I'm thinking along these lines:
If me.txtGoTo.value = 4 then
me.btnGo.setfocus
end if
But that doesn't work. What would?