Results 1 to 6 of 6
  1. #1
    cottonland is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Apr 2016
    Posts
    9

    Set input mask to "000" for a number

    I am having trouble with some items numbers not displaying properly. If I have ten items, my report lists them as 1,10,2,3,4,5,6,7,8,9. I understand why this is happening so I am wanting to use a 3 digit number. For example, 1 would be 001. This eliminates my problems with the order in which they are displayed.



    Can anyone tell me where I need to set the requirement for the field to list three digits? The field size for the corresponding record in the table is set to 3. I do not however know how to get the program to automatically recognize 1 as 001. I am sorry if this is in the wrong place and is elementary, but I am self taught as you can see.

    Thanks in advance for any assistance you can provide.



    Mike

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,931
    For example, 1 would be 001
    just set the format property of the control in your report to 000. The number will still be recognised as 1 for criteria/filtering and sorting purposes

  3. #3
    cottonland is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Apr 2016
    Posts
    9
    Thanks... My report is pulling from a Query, which is based off of a table. A form is used to input the data into the table. Do I set the format property on the Report or on the form that is used to input the data?

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,931
    Do I set the format property on the Report
    just set the format property of the control in your report to 000
    with regards your form it is up to you

    Note that format properties are not passed between objects except for a bound control on a form or report which will take the format (and other) properties from the table field properties at the time of creation of the control.

  5. #5
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    ...my report lists them as 1,10,2,3,4,5,6,7,8,9.
    That suggests that they field type in the underlying table is text, not numeric. If you change the data type to numeric, then the sorting will be done correctly, and you only need to use format on your forms and reports to display it with leading zero's.

  6. #6
    cottonland is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Apr 2016
    Posts
    9
    Thanks.... That did it.... Now on to the next Gremlin.....

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

Similar Threads

  1. Replies: 6
    Last Post: 06-24-2016, 06:07 AM
  2. Replies: 2
    Last Post: 01-04-2016, 04:44 AM
  3. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  4. Replies: 2
    Last Post: 02-27-2015, 10:03 PM
  5. Replies: 2
    Last Post: 06-12-2012, 09:47 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