M
MBC
I have created a query which calls a function in a Module that looks at
the call number of each book to determine the SubGroup that book
belongs to.
For instance, Call numbers that begin with F belong in the SubGroup
"AF" and call numbers beginning with "E" belong to SubGroup "Easy".
These all work just fine.
But I'm having problems with call numbers like these
(813,823,843,813.13,815.543,etc.) which need to be in the SubGroup
"AF". (they all begin with 8 and end with 3 & there may be 1-4 places
after the decimal point. A number like 810 would be in a different
SubGroup--it begins with 8 but doesn't end in 3). Call numbers like
these (J813, J823,J813.3, J812.543, etc.) need to be in the SubGroup
"JF".
I've tried something like this in the module:
If StartofCall Like "8#3" Then
SubGroup ="AF"
ElseIf StartofCall Like "8##[.]##3" Then
SubGroup ="AF"
ElseIf StartofCall Like "J8#3" Then
SubGroup ="JF"
ElseIf StartofCall Like "J8##[.] Then
SubGroup ="JF"
I've tried other variations as well, but nothing seems to work. Any
suggestions on how to do this?
the call number of each book to determine the SubGroup that book
belongs to.
For instance, Call numbers that begin with F belong in the SubGroup
"AF" and call numbers beginning with "E" belong to SubGroup "Easy".
These all work just fine.
But I'm having problems with call numbers like these
(813,823,843,813.13,815.543,etc.) which need to be in the SubGroup
"AF". (they all begin with 8 and end with 3 & there may be 1-4 places
after the decimal point. A number like 810 would be in a different
SubGroup--it begins with 8 but doesn't end in 3). Call numbers like
these (J813, J823,J813.3, J812.543, etc.) need to be in the SubGroup
"JF".
I've tried something like this in the module:
If StartofCall Like "8#3" Then
SubGroup ="AF"
ElseIf StartofCall Like "8##[.]##3" Then
SubGroup ="AF"
ElseIf StartofCall Like "J8#3" Then
SubGroup ="JF"
ElseIf StartofCall Like "J8##[.] Then
SubGroup ="JF"
I've tried other variations as well, but nothing seems to work. Any
suggestions on how to do this?