Link to home
Start Free TrialLog in
Avatar of Patrick O'Dea
Patrick O'DeaFlag for Ireland

asked on

Access datasheet - showing a number in scientific notation

I developed a very simple database.
All works fine in my environment.

But when my client accesses a datasheet there is a 14 digit numeric "12312312399" and it displays in the format "1.2312312399E+13"

Whay is it doing this? How do I fix?
It happened on 3 different PC's
Avatar of PatHartman
PatHartman
Flag of United States of America image

The data type of the long number should be short text.  Long numeric values that are not used for arithmetic should always be defined as text.  And some short ones also.  Zip codes are a good example.  In the US they are numeric but they are still codes and in New England, they start with a leading zero so if you define them as numeric rather than text, the leading zero is dropped since true numbers never include leading zeros.

The issue you are having is typically caused when you export a .csv file from Access and the users open it in Excel.  MS always tries to be helpful to the novice and this is one of those cases where their helpfulness causes actual damage.  If you double-click on a .csv file, Windows will open it with Excel since in almost all Windows installations, .csv is associated with Excel.  The problem is that Excel looks at the first 30 or so rows and makes a guess at the appropriate data type.  If your first few rows don't have any long numbers, Excel will assume "numbers" rather than "text".

To correctly open a .csv file that might contain long numeric codes or other numeric codes with leading zeros such as zip and SSN, go to the Data tab and import it there.  Excel gives you a dialog that allows you to specify column data types.
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Patrick O'Dea

ASKER

Thanks,

That worked perfectly!
You are welcome!

/gustav