Mandatory Data Entry

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ritchienino
    New Member
    • Feb 2013
    • 1

    Mandatory Data Entry

    I make a form Data Entry i want it like this if the cursor will go to a certain field he cannot move to the next field if he leave it empty or if it is null.....how can i make this?
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    You might be able to use the LostFocus event of the control to test if the control has something in it. If it doesn't then set the focus back to the control.

    Comment

    • zmbd
      Recognized Expert Moderator Expert
      • Mar 2012
      • 5501

      #3
      Personally the on_exit event as it fires before the lost focus event; however, each will work.
      Last edited by zmbd; Feb 7 '13, 01:59 PM. Reason: [z{something puzzling happend there}]

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32653

        #4
        Fields in a table, and controls on a form, both have a Required property. Setting either of these to Yes ensures no record is ever entered without a corresponding value for the field.

        What you ask for is somewhat different. Be careful of that, as it has an impact when navigating through the controls on a form and can prove unpopular with users (as they can get stuck on one control when they are interested in working within another).
        Last edited by NeoPa; Feb 7 '13, 03:24 PM. Reason: Redid properly.

        Comment

        Working...