Error 2585 This Action cannot be carried out while processing a form or report

D

David C. Widener

I have a custom password box called frmPassWordBox this is
a form with a text box and a OK button, the OK button has
code in it to open another form called frmEqumnt if the
textbox in frmPassWordBox has the right password
frmEqumnt's fields will be Unlocked if it is wrong
frmEqumnt's fields will be Locked this is done in the On
Open Event Procedure(frmEqumnt) then in the On Current
Event Procedure(frmEqumnt) frmPassWordBox is closed, all
works OK except with frmPassWordBox I need to be able to
execute the code in OK button by hitting enter when the
textbox has the focus, I have tried to use the On Exit
Event procedure of the textbox(frmPassWordBox) to execute
the On Click Event Procedure of the OK Button
(frmPassWordBox) but I am getting Error ***2585 This
Action cannot be carried out while processing a form or
report*** from the On Current(frmEqumnt), it seams as if I
need to release the On Exit Event Procedure
(frmPassWordBox) anyone know how I would do this ?
 
D

Dirk Goldgar

David C. Widener said:
I have a custom password box called frmPassWordBox this is
a form with a text box and a OK button, the OK button has
code in it to open another form called frmEqumnt if the
textbox in frmPassWordBox has the right password
frmEqumnt's fields will be Unlocked if it is wrong
frmEqumnt's fields will be Locked this is done in the On
Open Event Procedure(frmEqumnt) then in the On Current
Event Procedure(frmEqumnt) frmPassWordBox is closed, all
works OK except with frmPassWordBox I need to be able to
execute the code in OK button by hitting enter when the
textbox has the focus, I have tried to use the On Exit
Event procedure of the textbox(frmPassWordBox) to execute
the On Click Event Procedure of the OK Button
(frmPassWordBox) but I am getting Error ***2585 This
Action cannot be carried out while processing a form or
report*** from the On Current(frmEqumnt), it seams as if I
need to release the On Exit Event Procedure
(frmPassWordBox) anyone know how I would do this ?

I believe if you set the OK button's "Default" property to Yes (on the
Other tab of the button's property sheet in design view), the button's
Click event will fire any time the user presses enter in the text box.
No code should be required in the text box's Exit event procedure.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top