excel to access import question

  • Thread starter Thread starter SKB
  • Start date Start date
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
 
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
 
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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top