Closing a form

  • Thread starter Thread starter Peter \(again\)
  • Start date Start date
P

Peter \(again\)

I have a form with one field in it and an exit button to
close the form.
Is there any way I can get the form to close as soon as
the field has been filled and exited, rather than having
to click the exit button?

Thanks.
 
Peter, you can write a bit of code on the after update event of the field
e.g:

Private Sub FieldName_AfterUpdate()
DoCmd.Close acForm, "formname"
End Sub

Hope this helps.

Julia
 
Thanks, I had done that c ommand but hung on lostfocus
and it objected to that violently...
 
Back
Top