what I initially want to be able to return is the string without the last word!
ie: aaa bbb and aaa ccc ddd and xxx yyy.
eventually I want to be able to return a report that simply displays only the line items that have a product range with at least 1 item having 0 in stock..
ie: in the above case the first 2 product ranges aaa bbb and aaa bbb ccc would be displayed
anyone know how to do these?
you can certainly do what you say in your example using some instr() to find locations of spaces and mid$() starting at each space you find +1 to check if the next char is a number... this breaks down if any of your aaa bbb ccc might start with a number.
why are you messing with strings?
if you get your table right, you should have a nice integer value to show number in stock --- a query will find all items with intInStock = 0 and a second query on the results of this first query can find all DISTINCT product lines.