|
-
September 24th, 1999, 08:51 AM
#1
Setting focus back on a field
In my UserForm the date input is made of 3 fields (TextBox): one for the day (MaxLength-Property=2), one for the month (MaxLength=2) and one for the year (MaxLength=4). When entering the fourth digit in the year field an Exit-Event is started which composes the date with the entered day's and month's digits. A date validation is then executed (in then Exit-Event/Function) and i would like the focus to be set back in then day-field if the composed date is not valid (with the setfocus-Method use in the year-field Exit-Event). But I can't!
The focus doesn't stay in the day-field, it leaves it and jumps forward two field afer the year-field.
-
September 24th, 1999, 08:58 AM
#2
Re: Setting focus back on a field
if you use vb6 I suggest that you use the Validate Event. It's (almost) perfect for validating input and forcing the focus within a field.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|