Results 1 to 3 of 3

Thread: Type mismatch on function call

  1. #1

    Thread Starter
    Fanatic Member vb_dba's Avatar
    Join Date
    Jun 2001
    Location
    Somewhere aloft between the real world and insanity
    Posts
    1,016

    Type mismatch on function call

    I have a function call that produces a "type mismatch" error. The funny thing is that I cut and pasted the code from a function that works, both the function and function call.
    Code:
    SvcReturnFuncs.asp:
    
         Public Function BuildTable()
              
           'Do Some Processing
    
         End Function
    
    
    SvcReturnsReports.asp:
         <!-- #INCLUDE SvcReturnFuncs.asp -->
         ...
         'Call Function
         BuildTable()
         ...
    As I said before, the function and function call were copied from a peice of code elsewhere in the page. The only thing I changed was the function name and some processing the order in which data is displayed from inside the function.

    Any ideas would be appreciated.

    Thanks,

    Chris

  2. #2
    New Member
    Join Date
    Jun 2001
    Location
    Chicago
    Posts
    9

    Talking

    Most of the time when I get a type mismatch error it is because I either misspelled something, or I didnt list a field everywhere I should have.
    Most likely that is your problem, you said you changed the name of the function, so perhaps it is looking for something wiuth the original name. Just guessing.
    MtnDew55

  3. #3
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Does the function return a value? If not, it shouldn't be a function, it should be a sub.

    If it does, make sure you are assigning it to a variable when you call it:

    myvariable = BuildTable()
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

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



Click Here to Expand Forum to Full Width