I am trying to trigger a function with the following code: DoCmd.OpenFunction lstMailList.Value . The lstMailList.Value variable is from a listbox that they user can choose from, which is in turn bound to the name of the function I am trying to trigger. When I run this code, I get an error stating that they function does not exist. The name of the function is corrrect (and even shows in the error message). There is no OpenProcedure method to use, or I would have used that one. I don’t have much experience with Functions. Is there something I’m doing wrong??
Here is the function I’ve created:
Public Function subML_Ridge()
DoCmd.OpenQuery “qryML_HEC_DelTblML_Ridge”
DoCmd.Close acQuery, “qryML_HEC_DelTblML_Ridge”
DoCmd.OpenQuery “qryML_HEC2”
DoCmd.Close acQuery, “qryML_HEC2”
End Function