By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,247 Members | 1,250 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,247 IT Pros & Developers. It's quick & easy.

Help With form clear

P: n/a
I have a form which is designed to only data entry.
I have written the following code in the key press event
of the employee number to allow the user to enter only numbers in this
field.

If (KeyAscii < 48) Or (KeyAscii > 57) Then
KeyAscii = 0
MsgBox "Please Enter Only Numbers", vbOKOnly, "New Employee
Number"
End If

When the data entry is complete and when I hit enter in the last field
to save the record,no doubt the record are saved but the fields do
not get clear for the next data entry.And when I press enter again the
fields get clear and I get the message writtin in the key press event
of the employee id and the focus stays in the last field.All I want to
do is to save the record,Clear the form for the next data entry,set
the focus to employee id field .

Thanks in advance
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.