R
Ragnar Midtskogen
Hello,
I got the job of fixing a problem in an Access 2003 application.
The problem is a small form used to add items to a combobox list by updating
the underlying table.
The form has two command buttons, OK and Cancel.
The OK button calls a sub to add the contents of a couple of text boxes to
the table, then it tries to close the form, named frmEditBox with this code:
DoCmd.Close acForm, Form_FrmEditBox.Name
To close the form always takes two clicks.
The form also has a Cancel button with this code
DoCmd.Close acForm, Form_FrmEditBox.Name
Same thing, need to click twice to close the form.
However, if I click the OK button first, then the Cancel button, the form
closes.
My first idea was that this must have something to do with a focus event,
but I can't find any code that gets fired other than the button click
events.
Any help on this would be appreciated.
Ragnar
I got the job of fixing a problem in an Access 2003 application.
The problem is a small form used to add items to a combobox list by updating
the underlying table.
The form has two command buttons, OK and Cancel.
The OK button calls a sub to add the contents of a couple of text boxes to
the table, then it tries to close the form, named frmEditBox with this code:
DoCmd.Close acForm, Form_FrmEditBox.Name
To close the form always takes two clicks.
The form also has a Cancel button with this code
DoCmd.Close acForm, Form_FrmEditBox.Name
Same thing, need to click twice to close the form.
However, if I click the OK button first, then the Cancel button, the form
closes.
My first idea was that this must have something to do with a focus event,
but I can't find any code that gets fired other than the button click
events.
Any help on this would be appreciated.
Ragnar