excel to access import question

S

SKB

I have created a macro to import a 'Range' from an excel spreadsheet
into an existing table. One of the columns in the spreadsheet contains
percentages with two ( 56.89% )decimal places. The problem I'm having
is, I can't get the numbers to show in percentage in the table. I have
tried setting the field data type to 'Number' with 'percent' as the
format but, it still doesn't show correctly.

There must be something simple I'm missing. Any help appreciated.

SKB
 
V

vb

Usually when you just import the data it treats the number as a string.
Instead can you try writing a piece of code to read the data and insert into
the table?

vb
 
G

George Nicholson

Remember that number fields set to Byte, Integer or LongInteger will only
store whole numbers regardless of how you format them to display.

To store decimals, use Single, Double or set the DataType of the field to
Currency rather than Number (Currency has a fixed 4 decimals, and you can
format it to display without currency signs. Unless you need precision
beyond 4 places, use Currency).
 
Top