I'm trying to set up a button on a form to conditionally send an email based on a field in a table. The form is unbound and saves data to a table through a VB function called by a button.
The field comes from a table called "tblAIT", is a Yes/No field and is called Rework. Basically the user will select an Error Code on the form from a list. Each Error Code either requires rework or does not. What I would like to happen is when a user selects an error code, if the value for rework is set to Yes, the Submit button automatically sends an email then saves the error information to the table. If it is No, then it just saves the error with no email.
Would do you think would be the best way to go about this?
The field comes from a table called "tblAIT", is a Yes/No field and is called Rework. Basically the user will select an Error Code on the form from a list. Each Error Code either requires rework or does not. What I would like to happen is when a user selects an error code, if the value for rework is set to Yes, the Submit button automatically sends an email then saves the error information to the table. If it is No, then it just saves the error with no email.
Would do you think would be the best way to go about this?