In Access 2003, how can I call a custom VB function from a query?

Is it possible to call a custom VB function stored in the same Db access from a query written in this db, and if so how?

0


source to share


2 answers


Yes, you can call a macro or function from an Access query. Make your function public. Then call it inside your SQL like so:



 CustomFunction([field])

      

+1


source


Okay, here's the deal, Paul W.

I was trying to do this before I asked the question, and on reflection (not a .NET class!) I think my question could use a little more detail.



When you answered (and I think your answer could use a little more detail) it didn't look any different from what I was trying, so I looked at my code again. I found a dumb bug that was preventing me from getting the result I was looking for. I fixed it and everything is fine.

So in the end, I didn't ask the question that really bothered me, and therefore you didn't give me the solution I was looking for. However, you forced me to find a solution, so I would like to give you your details. However, I apparently do not have enough reputation (yet) to accept your answer or comment on it, so this answer will have to do. (I click on the checkmark all the time, but nothing happens.)

0


source







All Articles