data gets truncated

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I imported a number field that has four zeros and a number (00004). When the
number is transfered over into access, the only thing that shows up is a 4.
the zeros are gone. I can get the 4 zeros to show up?
 
00004 and 4 are the same value numerically. Access doesn't need the leading zeros,
nor do any math functions using the value. Two ways to get the leading zeros back.

1. Change the data type to string. Not sure how it will display.
2. Use scripting to format it for display.

From the vbscript reference site at MS.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vtoriFunctions.asp

FormatNumber(Expression [,NumDigitsAfterDecimal [,IncludeLeadingDigit
[,UseParensForNegativeNumbers [,GroupDigits]]]])

Arguments

Expression
Required. Expression to be formatted.
NumDigitsAfterDecimal
Optional. Numeric value indicating how many places to the right of the
decimal are displayed. Default value is -1, which indicates that the computer's
regional settings are used.
IncludeLeadingDigit
Optional. Tristate constant that indicates whether or not a leading zero is
displayed for fractional values. See Settings section for values.
UseParensForNegativeNumbers
Optional. Tristate constant that indicates whether or not to place negative
values within parentheses. See Settings section for values.
GroupDigits
Optional. Tristate constant that indicates whether or not numbers are grouped
using the group delimiter specified in the control panel. See Settings section for
values.
HTH
 
Back
Top