Re: Importing negative numbers when negative sign is at the back of the number

K

Ken Snell

Try importing the file into a "holding" table, and import this field as a
text field, then run an append query to copy the data to a "permanent"
table, and use a calculated field to convert the text value into a number:
ConvertNumber: CDbl([FieldName])
 
D

david epsom dot com dot au

ConvertNumber: CDbl([FieldName])

convertnumber: iif(right([fieldname],1)=
"-",-val([fieldname]),val([fieldname]))


Ken Snell said:
Try importing the file into a "holding" table, and import this field as a
text field, then run an append query to copy the data to a "permanent"
table, and use a calculated field to convert the text value into a number:
ConvertNumber: CDbl([FieldName])


--
Ken Snell
<MS ACCESS MVP>

Greg Taylor said:
I am trying to import a *.txt file into Access where the
negative sign is at the end of the number (ie. 450.00-).
Is there a way to make Access look at this as a negative
number? Each time I try to import it leaves the field
blank.
 
K

Ken Snell

or that....
< chuckle >

--
Ken Snell
<MS ACCESS MVP>

david epsom dot com dot au said:
ConvertNumber: CDbl([FieldName])

convertnumber: iif(right([fieldname],1)=
"-",-val([fieldname]),val([fieldname]))


Ken Snell said:
Try importing the file into a "holding" table, and import this field as a
text field, then run an append query to copy the data to a "permanent"
table, and use a calculated field to convert the text value into a number:
ConvertNumber: CDbl([FieldName])


--
Ken Snell
<MS ACCESS MVP>

Greg Taylor said:
I am trying to import a *.txt file into Access where the
negative sign is at the end of the number (ie. 450.00-).
Is there a way to make Access look at this as a negative
number? Each time I try to import it leaves the field
blank.
 
D

david epsom dot com dot au

--- it's less typing and thinking to amend an answer than to create one :)

(david)

Ken Snell said:
or that....
< chuckle >

--
Ken Snell
<MS ACCESS MVP>

david epsom dot com dot au said:
ConvertNumber: CDbl([FieldName])

convertnumber: iif(right([fieldname],1)=
"-",-val([fieldname]),val([fieldname]))


Ken Snell said:
Try importing the file into a "holding" table, and import this field
as
a
text field, then run an append query to copy the data to a "permanent"
table, and use a calculated field to convert the text value into a number:
ConvertNumber: CDbl([FieldName])


--
Ken Snell
<MS ACCESS MVP>

I am trying to import a *.txt file into Access where the
negative sign is at the end of the number (ie. 450.00-).
Is there a way to make Access look at this as a negative
number? Each time I try to import it leaves the field
blank.
 

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