on_exit

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have text-field on a form and want the form to close when certain
conditions are met and the user presses 'enter'

So i use the ON_EXIT event on the text field..
with some conditon tests
and put in
DoCmd.Close acForm, "formname"

access reacts with: run-time error 2585
'This action can't be carried out while processing a form or report event'

So how do i proceed? How to close down the current form anyway?

Can anyone help?
 
Try the AfterUpdate event of your text box to evalueate the conditions and
closing, you may need to save your record (docmd.RunCommand acCmdSaveRecord)
before closing
 
Thank you...right awnser...

jl5000 said:
Try the AfterUpdate event of your text box to evalueate the conditions and
closing, you may need to save your record (docmd.RunCommand acCmdSaveRecord)
before closing
 
Back
Top