Results 1 to 3 of 3
  1. #1
    wasim_sono is offline Advanced Beginner
    Windows XP Access 2013 64bit
    Join Date
    May 2005
    Location
    Pakistan
    Posts
    73

    Placing '0' in front of data

    Dear All


    I have a table with field "Rt" which is a text field.This field has above 50000 data values of 3 Digit like 152, 56, 2, 010, etc.

    What I need for exporting purpose in COBOL is that this data should become like 152, 056, 002, 010, etc. means if two digits data then replace one 0, if one digit then replace two 0.

    I used following expression in an update query.

    If len(int[Rt])<0 then move 0

    but its not working. Am I going wrong if yes please help me as early as possible.

    Thanks.

    Wasim

  2. #2
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    Wasim,

    Try something like this to force leading zeroes:

    Right('00' & [Rt], 3)

    That should ensure that the right number of leading zeroes are applied.

  3. #3
    wasim_sono is offline Advanced Beginner
    Windows XP Access 2013 64bit
    Join Date
    May 2005
    Location
    Pakistan
    Posts
    73
    Thanks Patrick

    It's working.


    Wasim

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

Similar Threads

  1. Placing images quickly
    By marcello.dolcini in forum Import/Export Data
    Replies: 1
    Last Post: 10-20-2008, 06:05 AM
  2. Find data, load data, and save as a new record
    By hawzmolly in forum Access
    Replies: 0
    Last Post: 10-05-2008, 03:18 PM
  3. Access 2002 Front-End Inconsistent Errors
    By janetb in forum Security
    Replies: 1
    Last Post: 07-28-2008, 12:17 PM
  4. VBA Opening Excel File and Placing Data in Cells
    By BobTHG in forum Programming
    Replies: 0
    Last Post: 01-13-2008, 03:01 PM

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