View Full Version : Please help with weird access number format problems


dannyspencer
09-16-2005, 04:41 AM
Hi there,

I have imported in an excel table into access. It has a lot of numbers that have many digits after the decimal place. I want to cut this down since they are prices to just 2 decimal places.

Problem is that access imports the fields as Text fields. when i go to change the columns that i want as numbers it looses the information after the decimal place for example 1.1156834 when i click Number (long integer) and standard format it is converted to 1.00 loosing everything.
This is getting really really fustrating now.

When i import there is a drop down list but it is disabled where i can change the column property (number, text etc) so cant do anything about it.

any help would be great...
Thanks
Dan

statsman
09-16-2005, 05:01 AM
You've probably already done this, but do you have the columns in Excel formated as numbers?

ScottGem
09-16-2005, 08:25 AM
for example 1.1156834 when i click Number (long integer) and standard format it is converted to 1.00 loosing everything.
This is getting really really fustrating now.


When Access imports from Excel it will generally set the format of the imported column to the first field in the import. If the first field is text it will do it as text. What I generally do is link to the Excel table then append the data to my table converting as necessary.

One last point. An Integer is the whole number part of a number, to the left of the decimal. So if you convert a text field to Long Integer of course the decimal portion will be dropped. Since these are prices you should use a currency datatype.