Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2012
    Posts
    22

    Unanswered: Delete Left Function

    I am currently trying to delete the first 18 characters of a particular field. Currently I am trying it through the query function and this is what I have been using as an expression:

    Expr1: left([Memo Text], 18)

    The query then brings back the correct results of the first 18 characters that I am wanting to delete. The problem is when I run it, it just shows the first 18 characters. If I do a select all delete on the query it deletes everything in the table. Do I need to Have another command with it so it will delete as well?

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Instead of worrying about what you want to Delete, you need to think about what you want to keep!

    EditedMT: Mid([Memo Text],19)

    will return everything except the first 18 characters.

    So if you now display the EditedMT Field in a Form or Report, it will display everything except the first 18 characters of the [Memo Text] Field, as it originally existed.

    Alternately, you could use

    EditedMT: Right( [Memo Text], Len([Memo Text])-18 )

    which would do the exact same thing!

    Linq ;0)>
    Last edited by Missinglinq; 06-04-12 at 23:37.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Mar 2012
    Posts
    22
    Well the part I am trying to delete was used in a previous edition, so it has an 18 character number that represents a specific document. Now when every we bring up the memo's it has this distinct number in the front, and they do not like how it prints. Also they are going to be re-numbering the documents in a not so distant future, so I am also trying to beat the clock for that. So I am just trying to delete the first 18 characters so they can have a better printed document to send to their bosses.

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    So instead of deleting the first 18 characters and printing the remainder, use one of the expressions I gave you and simply print the calculated field that either one of them returns!
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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