Forms Closing

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

Guest

I have a form with an unbound text box txtDept. I Have code attached to the
afte update event of this tevt box only. I have a button with code
DoCmd.Close "fromName",acSaveNo. When I press the button a parmeter box is
displayed requested the value of txtDept. If I select Close from the
toolbar, it works fine. I've search code for txtDept and haven't found any
instances of it. Any ideas?
 
I would first try compiling your code. (while looking at code...do a
debug-compile).

It sounds like you have errors in your code. You want the code to compile
BEFORE you try and run the application.
DoCmd.Close "fromName",acSaveNo.

The above don't look right...try

docmd.Close acForm,"formName"
 
I have compiled many times. No errors are found. I did a find for txtDept
for the whole system and the only instances displayed are for the after
update event on txtDept.
 
Justin,

What is the code in the AfterUpdate event of txtDept? Also, IIRC the
'acSaveNo' applies to changes to the form, not the record.

Brian
 
Back
Top