Hey guys,
I made a relatively simple formula:
Code:
Public Function First(Item As String, Vend As String, Major As String) As Integer
Select Case Vend
Case "SEAL", "TMPR"
First = 4
Case "ASHL"
If Left(Item, 1) Like "M" Then
First = 4
Else
Select Case Major
Case "1000", "2000", "2200", "1200", "2300"
First = 1
Case "1500", "2500", "2700", "1700", "2800", "2600"
First = 2
Case "3000", "3500", "3100", "3600", "3200", "3700"
First = 3
Case "5000", "5500", "5100", "5200"
First = 5
Case "6000", "6500", "6100", "6200"
First = 6
Case "4000", "4400", "4500", "7000", "7500", "4100", "7100", "4600"
First = 7
Case Else
First = 9
End Select
End If
End Select
Item, Vend, and Major are all pulled from our ODBC. I created a few other formulas that are all used in the same query as this. They all work great, except this one. I am getting the "wrong number of arguments" error when I try to exit that column in the query builder.
Any ideas?
Here is a snippet of the builder.