Stay at field

  • Thread starter Thread starter CJ
  • Start date Start date
C

CJ

Hi Groupies

I am using A2K7.

Is it possible to keep the cursor in a field until a value has been entered
in the field?

Some of my products have a condition that shows as either yes/no. If the
condition field shows as yes, I want to make sure that the user fills in the
quantity field for that product. It would make my life easier if they could
only enter a value or choose a different product, not move on to any other
fields.

Is this possible? If so, what would the code be?
 
Try putting a test in the onLoseFocus event for a control. If the test is
true then provide a msgbox and me.controlname.setfocus to force the focus
back to the required field. If the control never gets focus, then put the
same test in the BeforeUpdate event and if true, cancel the update and put
the focus on the errant control.
 
Thanks Steve.

One of those "Can't see the forest for the trees" things.

--
Thanks for taking the time!

CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!

Steve McLeod said:
Try putting a test in the onLoseFocus event for a control. If the test is
true then provide a msgbox and me.controlname.setfocus to force the focus
back to the required field. If the control never gets focus, then put the
same test in the BeforeUpdate event and if true, cancel the update and put
the focus on the errant control.
 
Back
Top