Hello again.
Sorry to disturb again, but i forgot to ask one thing in my question below.
If I put some validation code in the afterupdate or onexit event in a textbox, runs the validation (something is not to be less than 3) via the form (The user types some value which my validation discovers) and I want to first display a msgbox "Wrong value - lower than 3" and the run the [txtbox].setfocus method on the txtbox ...how to do it?
The txtbox just wont get focus; The control AFTER the txtbox will always get the focus!
To put it in other words, I want to loop and loop on the samt txtbox, until the user finally gets it right; puts something > 3. Only after this, is the control after my txtbox aloud to get its focus.
How?
the code:
sub validate()
if [txtbox] < 3 then
msgbox "No, no..."
[txtbox].setfocus 'Wont just work!!
end if
end sub
Sorry to disturb again, but i forgot to ask one thing in my question below.
If I put some validation code in the afterupdate or onexit event in a textbox, runs the validation (something is not to be less than 3) via the form (The user types some value which my validation discovers) and I want to first display a msgbox "Wrong value - lower than 3" and the run the [txtbox].setfocus method on the txtbox ...how to do it?
The txtbox just wont get focus; The control AFTER the txtbox will always get the focus!
To put it in other words, I want to loop and loop on the samt txtbox, until the user finally gets it right; puts something > 3. Only after this, is the control after my txtbox aloud to get its focus.
How?
the code:
sub validate()
if [txtbox] < 3 then
msgbox "No, no..."
[txtbox].setfocus 'Wont just work!!
end if
end sub