Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Posts
    3

    Unhappy Unanswered: Undefined function

    Hi I've created a quey in access that uses a public function in a module. However when i run the query in Visual basic i get a "undefined Function" error. Is there anyway around this problem...it's wrecking my head at the mo

  2. #2
    Join Date
    Feb 2004
    Posts
    199
    ?! strange, should work, if function name in module and in Query are same.
    MDB, ADP <-> MS SQL + VBA, ADO & RDO, .NET, Oracle, Java/Jsp.

  3. #3
    Join Date
    Feb 2004
    Posts
    3
    It works perfect when i run the query in Access, However i want to get the query records into a datagrid in visual basic an it gives the error, am i missing some library do you think?

  4. #4
    Join Date
    Feb 2004
    Posts
    199
    Of course! VB and any other process except Access inside (even onother Access, linked to youd app), can't see the modules inside!

    By the way, that's why you can have problems if you use NZ function, cose it is Access function , not VBA function.
    MDB, ADP <-> MS SQL + VBA, ADO & RDO, .NET, Oracle, Java/Jsp.

  5. #5
    Join Date
    Feb 2004
    Posts
    199
    in additon to explein more -
    when you open MDF files via ODBC, or other driver, Access isn't runs actually, the driver just expand a data from the Access MDB file, no driver can see a function , Functions may use global variables, that are controlled by Access Application, but when you expand only data from Access, no way to run Access inside funcion.

    To avoid this problem you shouldn't use user defined and Access function in your queries.
    That was a big reason that made me migrate to MS SQL, where I feel much better
    MDB, ADP <-> MS SQL + VBA, ADO & RDO, .NET, Oracle, Java/Jsp.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •