*!help!* Passing textbox as optional parameter in a function
Hi
I am using Access2002
I have a form with 5 text boxes which are parameters to a function
3 parameters are optional in the function
How do I pass the empty textbox values to a optional parameter?
Completely stumped on how to do this
Any ideas?
Regards
KC
Re: *!help!* Passing textbox as optional parameter in a function
"KayC" <kay_chua [at] yahoo.co.uk> wrote in message
news:8d132dc1-2e6f-4442-915a-287c690f9dec [at] 1g2000hsl.googlegr oups.com...
> Hi
> I am using Access2002
> I have a form with 5 text boxes which are parameters to a function
> 3 parameters are optional in the function
> How do I pass the empty textbox values to a optional parameter?
> Completely stumped on how to do this
> Any ideas?
> Regards
> KC
Checkout the "Optional" parameter in vba Function command.
or
Use the Nz() function when you make the function call:
=TestFunction(Nz(Param1,""), Nz(Param2,""), Nz(Param3,""), Nz(Param4,""),
Nz(Param5,""))
Fred Zuckerman