I'm trying to reference the result of a function in a query.
The function's job is to parse a string into a certain format. I have set up a public variable for the function output in the form's VBA code, strResult. So to generate strResult my code is:
strResult = fnParseString(Me.textCompanyName)
How would I refer back to the form public var in the query? Im assuming once I create the value of strResult, its value is persistent until the form is closed.
Here's the ones I tried and failed on:
Forms!formNameHere.strResult
Forms!formNameHere.strResult.value
Forms!formNameHere.Form.strResult
Forms!formNameHere.Form.strResult.value
I know I can reference control objects in queries... how about variables??
thanks, as always
RK
The function's job is to parse a string into a certain format. I have set up a public variable for the function output in the form's VBA code, strResult. So to generate strResult my code is:
strResult = fnParseString(Me.textCompanyName)
How would I refer back to the form public var in the query? Im assuming once I create the value of strResult, its value is persistent until the form is closed.
Here's the ones I tried and failed on:
Forms!formNameHere.strResult
Forms!formNameHere.strResult.value
Forms!formNameHere.Form.strResult
Forms!formNameHere.Form.strResult.value
I know I can reference control objects in queries... how about variables??
thanks, as always
RK