Parameter from a function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a function that creates a text string using values in text boxes on a form plus some other operators. I would like to use this string as the criteria for one field in a query. Does anybody know of a way to pass this parameter to the query? Thanks.
 
Bruce said:
I have a function that creates a text string using values in text boxes on a form plus some other operators. I would like to use this string as the criteria for one field in a query. Does anybody know of a way to pass this parameter to the query? Thanks.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You can use the function in the query's WHERE clause. E.g.:

WHERE String_column = FunctionName()

Make sure the function is declared Public. If there are other
functions with the same name in different class modules you can
preface the call w/ the class module's name. E.g., function is in
form "frmSummaryCriteria" class module:

WHERE string_column = Forms!frmSummaryCriteria.FunctionName()

You might have to delimit the function call with string delimiters
(not sure). E.g.:

WHERE String_column = "'" & FunctionName() & "'"

- --
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQFEV84echKqOuFEgEQLgFACfa2AyyrSLf8/9EAFXP96uz7dkAN0AnjaC
bkC39q0BiTKtLXUNVoqFmPU2
=FgJS
-----END PGP SIGNATURE-----
 
Back
Top