I'm using MS Access 2007 and having difficulty with VBA returning a value from a function. Here's my code, in a module:
Option Compare Database
Global CriteriaStr As String
Function Get_Criteria() As String
Return CriteriaStr
End Function
---
I get a compile error: Expected: end of statement
And it's indicating something is wrong with the "Return" line. What gives? Thanks for helping the newb.
Option Compare Database
Global CriteriaStr As String
Function Get_Criteria() As String
Return CriteriaStr
End Function
---
I get a compile error: Expected: end of statement
And it's indicating something is wrong with the "Return" line. What gives? Thanks for helping the newb.