coding "enter"

diversoln

Registered User.
Local time
Today, 20:54
Joined
Oct 8, 2001
Messages
119
On my form I have a number of text boxes that the user fills in. Then he needs to click an icon to go to the next form. Sometimes users fill the form out completely but click the icon without pressing the "enter" key for the last text box in the form so that lastbit of information is not captured. Is there a way to code in an "enter" keystroke on the icon's "on click" so this happens prior to retrieving the next form ?
 
Why don't you include in your code "on click" event a message to prevent users from creating records from incomplete data?
 
I agree, you should check for all your required info. My guess is that you are not closing the first form, therefore changes don't get written.

Code like this will let the user back out of an incomplete form:
If Me.Dirty Then
If MsgBox("Do you wish to save changes?", vbYesNo + vbQuestion, "SAVE CHANGES?") = vbNo Then
Me.Undo
End If
End If
 

Users who are viewing this thread

Back
Top Bottom