C
Charles D Clayton Jr
I need to organize a list of three digit numbers into one of five
categories:
"#11", "#12", "#13", "#3#", "#4#" with the # representing a wildcard.
I thought it would be easy. Just write a function and then call it
from a query but I guess you cannot use a wildcard in the Select Case
expression. Here is what I originally had:
Function Psort (A as Integer)
Select Case PID = "#11"
Progress = 1
Select Case PID = "#12"
Progress = 2
Select Case PID = "#13"
Progress = 3
Select Case PID = "#3#"
Progress = 4
Select Case PID = "#4#"
Progress = 5
Case Else
Progress = 9999
I was able to change the first three lines and get them to work but
not the last two.
Select Case PID = 111,211,311,411,511,611,711,811,911
Does anyone have any suggestions? Maybe I need to be thinking about
something completely different.
Thanks,
Charles D Clayton Jr
categories:
"#11", "#12", "#13", "#3#", "#4#" with the # representing a wildcard.
I thought it would be easy. Just write a function and then call it
from a query but I guess you cannot use a wildcard in the Select Case
expression. Here is what I originally had:
Function Psort (A as Integer)
Select Case PID = "#11"
Progress = 1
Select Case PID = "#12"
Progress = 2
Select Case PID = "#13"
Progress = 3
Select Case PID = "#3#"
Progress = 4
Select Case PID = "#4#"
Progress = 5
Case Else
Progress = 9999
I was able to change the first three lines and get them to work but
not the last two.
Select Case PID = 111,211,311,411,511,611,711,811,911
Does anyone have any suggestions? Maybe I need to be thinking about
something completely different.
Thanks,
Charles D Clayton Jr