Click here to Skip to main content
15,902,189 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Experts,

I'm using CallByName()

But in order to create query, i need to specify the parameters, I have 3 combobox 4 textboxes..

If user select Combobox1, Textbox2 and textbox4...

parameters will be CallByName(Combobox1, Textbox2 and textbox4)
parameters can be single or more than 2..

my other problem is that i will need to generate 53 reports, and each report rely on whats the user will select from the 3 comboboxes and 4 textboxes...

Please Help Me!
Posted
Updated 27-Oct-11 15:34pm
v2
Comments
Sergey Alexandrovich Kryukov 27-Oct-11 21:37pm    
Why using CallByName at all?
--SA
Alan Tuscano 27-Oct-11 21:41pm    
What do you Mean?

to avoid complex coding in vb, i instead created a 53 stored proc pointed to the reports,
i don't want to use Case Select as i will be creating 53 Cases...
Sergey Alexandrovich Kryukov 27-Oct-11 22:03pm    
How it justifies CallByName? 53 cases does not mean long case select...
--SA

1 solution

This function is described in detail here: http://msdn.microsoft.com/en-us/library/chsc1tx6%28v=VS.90%29.aspx[^].

I'm 99.99% sure you never need it. Actually, nobody really needs it, because the effect of this function can be easily obtain it from Reflection, and call by name is unreliable, because should anyone misspell a name or use an object of wrong type, a compiler won't detect a problem.

Here is my advice: when asking a question, explain an ultimate goal of using one or another technique, otherwise who knows is the whole idea right or not.

As to "my other problem", there is not formulation of any problem. "I will need to generate 53 reports". Well, generate them, you got my approval. :-)

—SA
 
Share this answer
 
Comments
Alan Tuscano 27-Oct-11 21:46pm    
Thanks for the suggestion SAKryukov, I'll be more specific..
Thanks Man! :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900