G
Guest
Someone please help me. I have 4 fields that I want to check as the user
leaves the field if they have filled them in. Example form comes up, cursor
on txtField1, user tabs (or else) off of txtField1, msgbox to alert user must
enter something, put cursor back in txtField1 box.
I have tried using the Private Sub txtField1_LostFocus() event to check the
field. However to check you have to setfocus (txtField1.setfocus) then check
if txtField1.text = "", and if so give message, and return cursor.
It looks like it iterrates many times through this, and I don't understand
why (perhaps once for each record ... or perhaps because each time I setfocus
it is loosing focus and tripping the event? Also the txtField1.setfocus
doesn't set the cursor back in the field, it remans in the next field.
Please help me with some code so that I can understand the behavior, and
principals.
Thank you in advance.
leaves the field if they have filled them in. Example form comes up, cursor
on txtField1, user tabs (or else) off of txtField1, msgbox to alert user must
enter something, put cursor back in txtField1 box.
I have tried using the Private Sub txtField1_LostFocus() event to check the
field. However to check you have to setfocus (txtField1.setfocus) then check
if txtField1.text = "", and if so give message, and return cursor.
It looks like it iterrates many times through this, and I don't understand
why (perhaps once for each record ... or perhaps because each time I setfocus
it is loosing focus and tripping the event? Also the txtField1.setfocus
doesn't set the cursor back in the field, it remans in the next field.
Please help me with some code so that I can understand the behavior, and
principals.
Thank you in advance.