By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,961 Members | 2,492 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,961 IT Pros & Developers. It's quick & easy.

*!help!* Passing textbox as optional parameter in a function

P: n/a
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
Jan 4 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"KayC" <ka******@yahoo.co.ukwrote in message
news:8d**********************************@1g2000hs l.googlegroups.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
Jan 4 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.