import text file errors - cutting off decimals

G

Guest

Hi,
I am trying to write a macro that uploads a csv file.
Field 7 is a price e.g 1.6500 but Access is cutting off the decimals giving
1 in field 7 of the table and not the complete 1.65. Can somebody help?
Thanks
George
 
N

Nikos Yannacopoulos

George,

This is most likely the result of the table field data type being
Integer or Long, which by definition is incapable of storing a decimal
part. Change field type to Single or Double (depending on the order of
magnitude of the values - press F1 while the cursor is in the fieldsize
property of the table design view for more details).

HTH,
Nikos
 
B

BD

In the advanced button you need to alter the type of the fields you
want, in that case to double and save as a import specification. Later
in all situation you need to import that file you must use that
specification.

[]'s
BD
 
G

Guest

Thanks BD,
That worked a treat. i appreciate your help.
George

BD said:
In the advanced button you need to alter the type of the fields you
want, in that case to double and save as a import specification. Later
in all situation you need to import that file you must use that
specification.

[]'s
BD

Hi,
I am trying to write a macro that uploads a csv file.
Field 7 is a price e.g 1.6500 but Access is cutting off the decimals giving
1 in field 7 of the table and not the complete 1.65. Can somebody help?
Thanks
George
 
G

Guest

BD,
i have another xls file i wish to import - and when i try to specify the
sheet name to import Access wont let me save an import specification. Do you
have a suggestion on how i can tell access in a macro how to import the
specific sheet name in the excel file?
Thanks
George

George said:
Thanks BD,
That worked a treat. i appreciate your help.
George

BD said:
In the advanced button you need to alter the type of the fields you
want, in that case to double and save as a import specification. Later
in all situation you need to import that file you must use that
specification.

[]'s
BD

Hi,
I am trying to write a macro that uploads a csv file.
Field 7 is a price e.g 1.6500 but Access is cutting off the decimals giving
1 in field 7 of the table and not the complete 1.65. Can somebody help?
Thanks
George
 
B

BD

I really don't know. Perhaps someone else will help you

[]'s
BD


BD,
i have another xls file i wish to import - and when i try to specify the
sheet name to import Access wont let me save an import specification. Do you
have a suggestion on how i can tell access in a macro how to import the
specific sheet name in the excel file?
Thanks
George

George said:
Thanks BD,
That worked a treat. i appreciate your help.
George

BD said:
In the advanced button you need to alter the type of the fields you
want, in that case to double and save as a import specification. Later
in all situation you need to import that file you must use that
specification.

[]'s
BD

On Tue, 13 Jun 2006 21:34:03 -0700, George

Hi,
I am trying to write a macro that uploads a csv file.
Field 7 is a price e.g 1.6500 but Access is cutting off the decimals giving
1 in field 7 of the table and not the complete 1.65. Can somebody help?
Thanks
George
 
J

John Nurick

Import specifications only apply when importing data from text files.

If you want to specify a sheet name in a macro, use the name as the
Range argument of the macro. If I remember rightly, you need to append a
$, using
Sheet1$
for Sheet1 and so on.

BD,
i have another xls file i wish to import - and when i try to specify the
sheet name to import Access wont let me save an import specification. Do you
have a suggestion on how i can tell access in a macro how to import the
specific sheet name in the excel file?
Thanks
George

George said:
Thanks BD,
That worked a treat. i appreciate your help.
George

BD said:
In the advanced button you need to alter the type of the fields you
want, in that case to double and save as a import specification. Later
in all situation you need to import that file you must use that
specification.

[]'s
BD

On Tue, 13 Jun 2006 21:34:03 -0700, George

Hi,
I am trying to write a macro that uploads a csv file.
Field 7 is a price e.g 1.6500 but Access is cutting off the decimals giving
1 in field 7 of the table and not the complete 1.65. Can somebody help?
Thanks
George
 

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

Top