Unanswered Calling VBA Functions from Access SQL

  • Saturday, November 17, 2007 8:17 PM
     
     

    How is this done ? How must the function be written and how does SQL recognize the function ?

All Replies

  • Monday, January 14, 2008 1:00 AM
     
     


    Hi

    You just write the function as a normal vba function and then use it as any other function eg sum() as Access will auto-recognise and call it.

    so

    Function Multiply(val1 int, val2 int) as long
    Multiply = Val1*Val2
    End Function



    can be used as

    select Multiply(col1,col2) from mytable or within the design view in the select part.