Results 1 to 2 of 2
  1. #1
    tpcervelo is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    28

    Convert number to fixed length text field

    I imported an Excel sheet with a field defined as number/numeric. In my make table query I need to convert that field to a fixed 9 position field with leading spaces.
    I cannot concatenate the field with a set number of leading spaces because the input field is not always th same size.
    I have tried using different attributes of the Format function but no luck.
    Any help or information is greatly appreciated.


    thanks

  2. #2
    dsmacs is offline Advanced Beginner
    Windows XP Access 2010 (version 14.0)
    Join Date
    Oct 2009
    Location
    Perth Western Australia
    Posts
    52
    Try

    right(" " & [VariableNumber],9)


    where " " is nine spaces and [VariableNumber] is the name of the field with the number you want to convert.

    Cheers
    Darren

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

Similar Threads

  1. creation of reports with fixed number of rows
    By georgia in forum Reports
    Replies: 1
    Last Post: 02-17-2010, 10:40 PM
  2. Field switching from Number format to Text
    By COforlife in forum Queries
    Replies: 1
    Last Post: 11-10-2009, 03:23 PM
  3. Replies: 1
    Last Post: 06-01-2009, 04:05 PM
  4. Replies: 1
    Last Post: 10-09-2008, 04:48 AM
  5. Concatenate two fields (text & number) for key field
    By Larry Elfenbein in forum Forms
    Replies: 2
    Last Post: 11-10-2005, 07:45 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