• Number Data Type (2003)

    Author
    Topic
    #440848

    This is probably an easy question, but here goes. What is the best way to store the number “01” in Access, specifically a number field. Currently, I only get “1” to display, so I had to switch my data type to text to display “01”. As always, any help would be much appreciated! Thanks in advance.

    Viewing 0 reply threads
    Author
    Replies
    • #1057042

      It depends on what you want. If you may want to perform calculations with the number, it’s best to store it in a number field. You can set the Format property of the field in the table and/or the Format property of a text box bound to the field on a form or report to 00 (i.e. two zeros). Access will store the values as 3 or 37 etc., but they will be displayed with a leading zero if necessary: 03, 37.
      If the field is basically a text field that happens to look like a number, you can use a text field. It will store the values exactly as entered, and there is no check that the value can be converted to a number – a value such as O3 (with a letter O instead of the digit 0) would be accepted too.

    Viewing 0 reply threads
    Reply To: Number Data Type (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: