prabhafriend
03-06-2009, 03:53 AM
Hello Friends. I am Prabha Karan from Thanjavur (South India). I am currently working in a Retail Management Tool using Ms-Access. I created a form for invoice which has 1 tab control having three pages in it. I invoke the ‘on-exit’ event for every last object (textbox) in a page to set focus on the first control on the next page. For the first two pages its works fine. I want to close the form after exiting (invoking the ‘on-exit’ event) the last control (text box) on that tab. I used the ‘Docmd’ command object to the close the form, but it says “This action can’t be carried out while processing a form or report event”. Is there a way to do it invoking the ‘on-exit’ event? Primarily my task is to close the form after getting exit from the last control in tab. To the close the form automatically is my task, if it is not possible using the ‘on-exit’ event, kindly, explain why this is not happening in this way? If possible, tell me an alternate. Thanks in Advance.