Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2002
    Western Australia

    Question Unanswered: Access97 string manipulation

    I have an Access97 database with information of the likes..
    key quantity

    aaa bbb 01 20
    aaa bbb 02 0
    aaa ccc ddd 00 0
    aaa ccc ddd 01 1
    xxx yyy 01 5
    xxx yyy 03 2

    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?


  2. #2
    Join Date
    Dec 2002
    Préverenges, Switzerland
    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts