R
ryansarmy
Hello, I have a query that attempts to find differences in a comma
seperated string. The string looks something like
32473,30,30,C,C,80,0,RDS,4/26/2006 1:53:07 PM
in my query I use OldQuantity: Splitem([Itemsforsalekey],",",2)<
and NewQuantity: Splitem([Itemsforsalekey],",",3)
to call my function
Public Function Splitem(TheString As String, _
Delim As String, _
ReturnIndex As Integer) As String
Dim s() As String
s = Split(TheString,Delim)
If ReturnIndex < 1 or ReturnIndex > UBound(s)+1 Then
Splitem = ""
Else
Splitem = s(ReturnIndex-1)
End If
End Function</i>
The problem is when I try to compare the two, I get a data type
mismatch error
In the criteria for OldQuantity I put in Where <>
Splitem([Itemsforsalekey],",",3)
Please help,
Ryan Sarmast
seperated string. The string looks something like
32473,30,30,C,C,80,0,RDS,4/26/2006 1:53:07 PM
in my query I use OldQuantity: Splitem([Itemsforsalekey],",",2)<
and NewQuantity: Splitem([Itemsforsalekey],",",3)
to call my function
Public Function Splitem(TheString As String, _
Delim As String, _
ReturnIndex As Integer) As String
Dim s() As String
s = Split(TheString,Delim)
If ReturnIndex < 1 or ReturnIndex > UBound(s)+1 Then
Splitem = ""
Else
Splitem = s(ReturnIndex-1)
End If
End Function</i>
The problem is when I try to compare the two, I get a data type
mismatch error
In the criteria for OldQuantity I put in Where <>
Splitem([Itemsforsalekey],",",3)
Please help,
Ryan Sarmast