Inserting Decimals

G

Guest

I have these Medical codes that should have decimals two spaces from the
right but when I get the files from IT they don't include any decimals. How
would I tell access to insert decimals in that field. The data format is text
because some of the codes contain letters. Thank you.
 
G

Guest

Try this substituting your field name for TITLE ---
Expr1: IIf(InStr([TITLE],".")>0,[TITLE],Left([TITLE],Len([TITLE])-2) & "." &
Right([TITLE],2))
 
G

Guest

Worked great! thank you

KARL DEWEY said:
Try this substituting your field name for TITLE ---
Expr1: IIf(InStr([TITLE],".")>0,[TITLE],Left([TITLE],Len([TITLE])-2) & "." &
Right([TITLE],2))
--
KARL DEWEY
Build a little - Test a little


Florida Analyst said:
I have these Medical codes that should have decimals two spaces from the
right but when I get the files from IT they don't include any decimals. How
would I tell access to insert decimals in that field. The data format is text
because some of the codes contain letters. Thank you.
 
G

Guest

Ok to build on the question that I asked, the code below works, however when
the data is extracted from the file sent from IT, the file contains some
spaces that causes the decimal place to not work right, I thought that maybe
including a
Trim([TITLE]) would be easy to included, however everywhere I place the
command it gives me an error, do you think I would have to run two queries
include all he commands I want?

KARL DEWEY said:
Try this substituting your field name for TITLE ---
Expr1: IIf(InStr([TITLE],".")>0,[TITLE],Left([TITLE],Len([TITLE])-2) & "." &
Right([TITLE],2))
--
KARL DEWEY
Build a little - Test a little


Florida Analyst said:
I have these Medical codes that should have decimals two spaces from the
right but when I get the files from IT they don't include any decimals. How
would I tell access to insert decimals in that field. The data format is text
because some of the codes contain letters. Thank you.
 
G

Guest

If you want to remove all the spaces then use this ---
Expr1: IIf(InStr(Replace([TITLE]," ",""),".")>0,Replace([TITLE],"
",""),Left(Replace([TITLE]," ",""),Len(Replace([TITLE]," ",""))-2) & "." &
Right(Replace([TITLE]," ",""),2))


--
KARL DEWEY
Build a little - Test a little


Florida Analyst said:
Ok to build on the question that I asked, the code below works, however when
the data is extracted from the file sent from IT, the file contains some
spaces that causes the decimal place to not work right, I thought that maybe
including a
Trim([TITLE]) would be easy to included, however everywhere I place the
command it gives me an error, do you think I would have to run two queries
include all he commands I want?

KARL DEWEY said:
Try this substituting your field name for TITLE ---
Expr1: IIf(InStr([TITLE],".")>0,[TITLE],Left([TITLE],Len([TITLE])-2) & "." &
Right([TITLE],2))
--
KARL DEWEY
Build a little - Test a little


Florida Analyst said:
I have these Medical codes that should have decimals two spaces from the
right but when I get the files from IT they don't include any decimals. How
would I tell access to insert decimals in that field. The data format is text
because some of the codes contain letters. Thank you.
 

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