I have a comboBox on my form with about 8 query names from a Query Name Table. When I select a Query from the Dropdown it opens the query. What I would like to do is if a Query named OutOfStockQRY-ALL is selected I would like to open the query and send a email. If the OutOfStockQRY-ALL is not selected I just want to open the Query. Below is the code I currently have. I know how to send the email I just do not know how to make it send the email if it is only OutOfStockQRY-ALL.
Code:
Private Sub FourFiveAvgPctQry_AfterUpdate()
DoCmd.OpenQuery Me.FourFiveAvgPctQry
Me.FourFiveAvgPctQry = Clear
End Sub