Table:
[ID] ; [str_status] ; [str_nextallowed status]
1 ; Received ; 3,4,11
2 ; Returned ; 3,4,5,21
3 ; Storage ; 4,5,11,23
4 ; Shipped ; 2
5 ; OutOfService ; 12,13,21
...
10 ; moredatat ; 3,5,6
11 ; boohoo ; 33,93,53
... etc...
Ok, here's the question:
I need to match exactly the partial string = "3" in the [str_nextallowed satus] field; thus, returning only the records with "3"
i.e: [ID]=1, [ID]=2 and [ID]=10 but NOT [ID]=3, [ID]=5, nor [ID]=11 etc...
from what I've found so far with google and the search are criteria using LIKE and "*" which endup returning all the records with a "3" in them no matter if it is "3", "33", or "13" ; HOWEVER, I may need to search for a value like "13" or "33" at some point.
I am using this to filter a combo-box and really don't want to build yet another table where the allowed next status is setup.... one record for each allowed sub-string... imagine, for [ID]=1, there would be three records, [ID]=2 would have four records, etc...
I am using VBA to set the record source for the combo-box based upon the currently selected record.
[imgnothumb]http://bytes.com/attachments/attachment/7402d1388706344/z_anmt_02.gif[/imgnothumb]
[ID] ; [str_status] ; [str_nextallowed status]
1 ; Received ; 3,4,11
2 ; Returned ; 3,4,5,21
3 ; Storage ; 4,5,11,23
4 ; Shipped ; 2
5 ; OutOfService ; 12,13,21
...
10 ; moredatat ; 3,5,6
11 ; boohoo ; 33,93,53
... etc...
Ok, here's the question:
I need to match exactly the partial string = "3" in the [str_nextallowed satus] field; thus, returning only the records with "3"
i.e: [ID]=1, [ID]=2 and [ID]=10 but NOT [ID]=3, [ID]=5, nor [ID]=11 etc...
from what I've found so far with google and the search are criteria using LIKE and "*" which endup returning all the records with a "3" in them no matter if it is "3", "33", or "13" ; HOWEVER, I may need to search for a value like "13" or "33" at some point.
I am using this to filter a combo-box and really don't want to build yet another table where the allowed next status is setup.... one record for each allowed sub-string... imagine, for [ID]=1, there would be three records, [ID]=2 would have four records, etc...
I am using VBA to set the record source for the combo-box based upon the currently selected record.
[imgnothumb]http://bytes.com/attachments/attachment/7402d1388706344/z_anmt_02.gif[/imgnothumb]
Comment