Data Validation

M

mevert

I have a Before Form Update validation code which checks to see that all
required fields are filled in. For now I have specified a field that the
cursor is to go to when the data validation is complete. Assuming that all
the fields are filled in as required, how can I make the cursor go back to
the field it was in before the data validation process kicked in?--
mevert
 
A

Albert D.Kallal

For now I have specified a field that the
cursor is to go to when the data validation is complete.

Just remove the above...and the cursor should not move from where it was/is.

It is perhaps possible you are accident using the .text property of a
control...and if you are, then you are creating a mess, and much more work
then you need.

You do not have to move the focus to test/check a value of a field.

You can, and should use

if (me.LastName) = null then
bla ba babl..

etc. etc.

None of your code needs to "move", or change the focus to test, or even set
controls on a form. So, I am somewhat at a loss as to why you need to set
the focus back to where it was when you don't need to move it in the first
place?
 
Top