Data Entry field on Form - keep focus

K

Kwesi Thomas

Hi Guys,

I'm tring to get the first data entry field on my form to
KEEP the focus until a valid entry has been made.

I am trying to stop the user from going to the next field
until a valid entry has been made into the field.

Any ideas?
 
W

Wayne Morgan

In the BeforeUpdate event of the control, check for a valid entry. If it isn't valid,
cancel the update.

Example:

If (your validity check here) Then
Msgbox ("Invalid data")
Cancel = True
Me.ActiveControl.Undo
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top