Shadi Saleh
asked on
MS Access: Run a code after returning to a form
I have a main form that has controls on it. It has a custom Search button that when clicked opens another form to search specific record. After closing the search form, I would like to perform some validations and tasks before moving to the record that was picked from the search form.
I tried putting this code in the main form gotfocus event but it did not work (may be because it has controls). Also I tried the activate event with no luck.
Where can I put such validation code before moving to the picked record?
Main form is open all the time.
I tried putting this code in the main form gotfocus event but it did not work (may be because it has controls). Also I tried the activate event with no luck.
Where can I put such validation code before moving to the picked record?
Main form is open all the time.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Unfortunately, it did not work for me.
After investigations, I can see that acDialog does not work with acFormDS which is my form view.
As a work around I designed a new form as a acNormal form and embedded the DS form as a subform.
And this did the trick.
I will mark your solution as the best, but please add these notes to it.
Thank you!