WHERE Parameter - what's faster?

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

Guest

Hi guys,

What's do you think is faster, passing a textbox value from a form or using
a =getvalue() function to populate a parameter in a WHERE clause?

ex.
WHERE Fund=[forms]![frmFund].[txtFundName]
or
WHERE Fund=getFundName()
 
Hi Matt,

My guess would be that the form reference would be faster. Generally my
experience has been that even fairly simple user functions can slow down a
query. Of course, in this case being used in the Where clause should only
call it once, so I don't know that there would be a noticeable difference one
way or another.

One other thing to think about though, if someone else is trying to figure
out what the query is doing down the road, it will likely be much easier for
them to figure out what is going on seeing the reference to the form control
rather than an unknown user function that they would have to look up in VBA.

HTH, Ted Allen
 
Back
Top