Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Run-time Error '13'.    Type mismatch

Posted on 2014-03-06
4
Medium Priority
?
489 Views
Last Modified: 2014-03-11
I also attached a Screen Shot file
Any ideas on what could be causing this error?

When running this code the following line causes an error...
.Parameters.Append .CreateParameter("ifo_area_cat", adBigInt, adParamInput, , CLng(Trim(parasplit(4))))

Open in new window

Error - Run-time Error '13'.    Type mismatch

Debugger points to...
.Parameters.Append .CreateParameter("ifo_area_cat", adBigInt, adParamInput, , CLng(Trim(parasplit(4))))

Open in new window


Code...
Public Function SetReportData(ByRef objReport As Report, strReportName As String, intConnectionType As Long, Optional strFilter As String = "", Optional strOrder As String = "", Optional strParameter As 

String = "", Optional intRecordSets As Long = 1, Optional strSubReportNames As String = "", Optional blnNoCopy As Boolean = True, Optional ByRef rsDataSource As ADODB.Recordset) As Boolean



Case "CycleCountReport"
            With cmd
                .Parameters.Append .CreateParameter("iStartDate", adDate, adParamInput, , CDate(Trim(parasplit(0))))
                .Parameters.Append .CreateParameter("iEndDate", adDate, adParamInput, , CDate(Trim(parasplit(1))))
                .Parameters.Append .CreateParameter("iCompanyID", adBigInt, adParamInput, , CLng(Trim(parasplit(2))))
                .Parameters.Append .CreateParameter("iBuilding", adBigInt, adParamInput, , CLng(Trim(parasplit(3))))
                .Parameters.Append .CreateParameter("ifo_area_cat", adBigInt, adParamInput, , CLng(Trim(parasplit(4))))
                .Parameters.Append .CreateParameter("iAisleString", adVarChar, adParamInput, 1000, Trim(parasplit(5)))
                .Parameters.Append .CreateParameter("iVariancesOnly", adTinyInt, adParamInput, , CInt(parasplit(6)))
            End With
            
            SQLstr = "spITS_CycleCountReport"

Open in new window

2855--Debugger-Screen-Shot.JPG
0
Comment
Question by:tesla764
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 39909769
Indicates you're passing a string (non numerical) when a number is expected.
Whats the source of parasplit
0
 

Author Comment

by:tesla764
ID: 39913617
Sorry I haven't responded just yet. I will soon. I have been working on other problems that have arisen.
Thanks for you patience.
0
 

Author Closing Comment

by:tesla764
ID: 39921825
Thanks, I got this worked out.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question