Formating Percent with VB

B

Beeyen

Good Day,

I am in need of a little assistance with the VB script below. I have a form
in Access 2003 where the review score field is formatted as a percent. I am
trying to have the script below to transfer the information from the review
score field into the body of an email where the formatting is the same as
that which is in the form. For example: Review Score – 100%, or 100.00% or
99.88%.

The review score field is formatted as a percent. So no matter the number
entered in the field, it shows in the field as 100% or 98.99% or 97.50%, etc.
If possible I would like the formatting to stay the same when shown in the
email. Would someone be able to assist?

Thanks

& vbCrLf & "Review Score - " & Me.Review_Score _
& vbCrLf & vbCrLf & "DataTRAK Number - " & Me.Datatrak_Number _
& vbCrLf & "Effective Date - " & Me.EFFECTIVE_DATE _
& vbCrLf & "Production Assigned - "
 
D

Dirk Goldgar

Beeyen said:
Good Day,

I am in need of a little assistance with the VB script below. I have a
form
in Access 2003 where the review score field is formatted as a percent. I
am
trying to have the script below to transfer the information from the
review
score field into the body of an email where the formatting is the same as
that which is in the form. For example: Review Score – 100%, or 100.00%
or
99.88%.

The review score field is formatted as a percent. So no matter the number
entered in the field, it shows in the field as 100% or 98.99% or 97.50%,
etc.
If possible I would like the formatting to stay the same when shown in the
email. Would someone be able to assist?

Thanks

& vbCrLf & "Review Score - " & Me.Review_Score _
& vbCrLf & vbCrLf & "DataTRAK Number - " & Me.Datatrak_Number _
& vbCrLf & "Effective Date - " & Me.EFFECTIVE_DATE _
& vbCrLf & "Production Assigned - "



& vbCrLf & "Review Score - " & Format(Me.Review_Score, "percent") _
 
T

Tom van Stiphout

On Thu, 15 Apr 2010 07:31:01 -0700, Beeyen

You could use the Format function:
Format(myValue, "Percent")

-Tom.
Microsoft Access MVP
 

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

Similar Threads


Top