Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Posts
    7

    Unanswered: vb functions in queries (access 2003)

    this used to work in an Access query prior to access 2003:

    CalculatedField: MyFunction("XXX"; YYY)

    where MyFunction is a Public Function defined in a module:

    Public Function MyFunction(param 1 as string, param2 as long)

    ...
    MyFunction=SomeValue

    End Function

    Seemingly this does not work anymore in Access 2003.
    It complains that MyFunction is not recognized.

    what do I have to do to have it working?

    thanks

    fbord

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Where is your function? Is it in a Module or a FormModule?

  3. #3
    Join Date
    Oct 2002
    Posts
    7
    it is in a Module. (NOT a Class Module, btw)

    thanks again

    fbord

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Try to open any Module, compile them and store them, if this run smooth then try to open the TestWindow or the direct Window wher you can input your direct orders, try to write your function name there and see whether it would be executed or not. Also you can open Object Cataloge by pressing F2, and search your Function there

Posting Permissions

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