truncate a text field in an access query

Posted on 2007-07-26
Last Modified: 2013-11-27
In an access query I would like to display only the first 20 characters of a 40 character text field. I don't want to change the size of the field in the underlying table just display the first 20 in the query display. Is there a command for text fields similar to the format([number field],"0.00") command for number fields?
Question by:Rwardlow
    LVL 92

    Accepted Solution

    LVL 92

    Expert Comment

    by:Patrick Matthews
    SELECT Left([fieldname], 20) AS Truncated
    FROM SomeTable
    LVL 1

    Author Comment

    excellent, thanks

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
    In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now