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

  • Thread starter Thread starter Ken Snell
  • Start date Start date
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])
 
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.
 
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.
 
--- 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.
 
Back
Top