Formating Percent with VB

  • Thread starter Thread starter Beeyen
  • Start date Start date
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 - "
 
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") _
 
On Thu, 15 Apr 2010 07:31:01 -0700, Beeyen

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

-Tom.
Microsoft Access MVP
 
Back
Top