Number Format from Linked table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My form pulls data from a linked table and calculates an annual return which
appears on a message box. How can I format the number to appear as ##.##
instead of 8.1243543234 ?

strMsg = "Annualized Return" ("me.Account &"," Me.Date): "& rst.feilds(0)
&"."&

Output = Annualized Return (Account Name, Date): 8.1243543234
 
SharonInGa said:
My form pulls data from a linked table and calculates an annual return which
appears on a message box. How can I format the number to appear as ##.##
instead of 8.1243543234 ?

strMsg = "Annualized Return" ("me.Account &"," Me.Date): "& rst.feilds(0)
&"."&

Output = Annualized Return (Account Name, Date): 8.1243543234


Use the Format function:

strMsg = "Annualized Return (" & me.Account & "," & Me.Date
& "): " & Format(rst.fields(0), "0.00") & "."

SHaron, in the future, when posting an expression or code,
please use Copy/Paste instead of retyping it. The typos you
might make by retyping can be confusing or even downright
misleading.
 
YES! (thank you)

Marshall Barton said:
Use the Format function:

strMsg = "Annualized Return (" & me.Account & "," & Me.Date
& "): " & Format(rst.fields(0), "0.00") & "."

SHaron, in the future, when posting an expression or code,
please use Copy/Paste instead of retyping it. The typos you
might make by retyping can be confusing or even downright
misleading.
 
Back
Top