Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save robwelan/bba35e8de4f31f14789225692355110b to your computer and use it in GitHub Desktop.
Save robwelan/bba35e8de4f31f14789225692355110b to your computer and use it in GitHub Desktop.
Function ReturnStandardQuery(strQueryName As String) As String
Dim varMsg As Variant
On Error GoTo handle_Error
ReturnStandardQuery$ = CStr(DLookup("\[qryString]", "tblOfQueries", "\[qryName]='" & strQueryName$ & "'"))
If ReturnStandardQuery$ = "" Then GoTo handle_Error
exit_Gracefully:
On Error Resume Next
Exit Function
handle_Error:
MsgBox "Error " & Err.Number & " " & Err.Description & " in ReturnStandardQuery$ function."
End If
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment