I have a form called frmMealDailyEntry. I have a public function myjobfun that records the job function of the individual logging into the db. If an RN logs into the db and opens the form frmMealDailyEntry I want them to be required to enter the MealsDeliv control to be updated to a numeric value. The form should not close withoout this number being entered. The default value is currently set to "***" I would think on close event should be something like if myjobfun="RN" and me.MealsDeliv="***" then docmd. msgbox("MealsDeliv must be entered") then docmd.goto control("MealsDeliv") cancel close. I am not sure how to cancel the close. Thanks for the help.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.