Results 1 to 3 of 3
  1. #1
    lions1855 is offline Novice
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    2

    extract text from memo

    I need to extract from a memo style just the shipping information in US pounds.

    Shipping (Package) Weight: 0.28 kg [0.62 lb]

    One of my attempts was to use this query:

    Shipping (Package) Weight: Mid([Technical],InStr(1,[Technical],"]",1)+1,Len([Technical])-(InStr(1,[Technical],"lb ] ",1)+1))

    However, this does not seems to work. Can anyone help me to select just the information between [ lb ]. I do not need the brackets before or after.

    Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I think you're on the right track. It appears that in the second argument of the Mid() function (the starting point), you're looking for "]" when you should be looking for "[".
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    lions1855 is offline Novice
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    2
    Hello, I did what you told me but the query is returning other stuff.

    Here is how the originial memo looks

    Product Height: 19.00 mm [0.75 in]
    Product Length: 29.00 mm [1.14 in]
    Carton Quantity: 80
    Shipping (Package) Weight: 0.03 kg [0.07 lb]
    Product Width: 26.00 mm [1.02 in]
    Battery Type: Alkaline
    Voltage: DC 4.5V

    Each of this line have a char(13) or break. So, when running the query, it should be pulling just the information that I need which is "product's 0.07 lb"

    Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Auto expand memo field vertically to fit text
    By grant.smalley in forum Forms
    Replies: 1
    Last Post: 02-04-2010, 05:54 PM
  2. Extract text from middle of a field
    By AccessNubie in forum Access
    Replies: 3
    Last Post: 11-02-2009, 01:13 PM
  3. Extract numbers from text string strored in a field.
    By khabdullah in forum Programming
    Replies: 2
    Last Post: 12-23-2007, 06:55 PM
  4. Replies: 9
    Last Post: 07-21-2006, 05:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums