Hi All,
I currently have a bound form which is used for Inserting/ updating data for a Position and the Employee(s) staffing that position. My users would like me to incorporate some fool-proof input validation between the mainform (Position) and its subform (Employee). For example, if the status of the Position = 'Staffed', Then there must be an employee currently in the subform and vice versa. There are about a dozen or so other Input Validation rules they would like me to implement, however I am running into a couple problems.
Since Bound forms typically automatically update the table data, I have needed to implement vba in the _BeforeUpdate() in order to prompt the user to Save before Entering the Subform or Closing the Form. This Holds off on updating the data in the table unless the user explicitly tells the application to. This also occurs before Entering the Subform.
Since the position information must be completed before the employee information, is it possible to implement the input validation they are looking for on this bound form? In the example I gave above, when the [PositionStatus] = 'Staffed' there must always be a person in that position, however since the save event occurs at a different interval for the Position and the Employee, I don't see how I can achieve this while maintaining the nature of not updating table data until 'Saved'.
If I put the Input Validation in the Subform, then there would be no Input validation on the other side. So, if A person is listed in the subform and everything is just dandy, then the user changes the [Status] on the mainform, there would be nothing stopping them.
Any insight is greatly appreciated! Hopefully I am just missing something entirely.
Thank you,
Skid