UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Using Ccur Within A Text Field Value, Office 2007    
 
   
Scot
post Feb 27 2012, 09:28 AM
Post #1

UtterAccess Guru
Posts: 800
From: Silver Spring Maryland, USA



If have the following vba command for a textbox. Me.Txt_CallbackInstructions.Value = "the amount of $" & Me.Txt_SumUnpaid & ". This is a reminder"

Me.Txt_SumUnpaid is formatted as currency with a control source that includes a DSum to gather the information. Using the following syntax in my .value code yields these results

" & Me.Txt_SumUnpaid & " Results In 2 or 2.5
" & CCur(Me.Txt_SumUnpaid) & " Results In 2 or 2.5
" CCur(& Me.Txt_SumUnpaid &) " Results in errors

What's the proper syntax?
Go to the top of the page
 
+
Larry Larsen
post Feb 27 2012, 09:51 AM
Post #2

UA Editor + Utterly Certified
Posts: 23,087
From: Melton Mowbray,Leicestershire (U.K)



Hi Scot

Sorry are we simply trying to format the results..!!!
(IMG:style_emoticons/default/thumbup.gif)
Go to the top of the page
 
+
Scot
post Feb 27 2012, 10:24 AM
Post #3

UtterAccess Guru
Posts: 800
From: Silver Spring Maryland, USA



Opps, how did I miss saying that. Yes, I want to format the inserted field comment.
Go to the top of the page
 
+
Larry Larsen
post Feb 27 2012, 10:59 AM
Post #4

UA Editor + Utterly Certified
Posts: 23,087
From: Melton Mowbray,Leicestershire (U.K)



Hi
Try using some thing like:
CODE
"bla bla " & FormatCurrency([Me.Txt_SumUnpaid],2) & "bla bla"

(IMG:style_emoticons/default/thumbup.gif)
Go to the top of the page
 
+
Scot
post Feb 27 2012, 11:45 AM
Post #5

UtterAccess Guru
Posts: 800
From: Silver Spring Maryland, USA



Ah, that works. I was so caught on CCur that I didn't think of Format. (IMG:style_emoticons/default/frown.gif) Always another way to skin the cat.
Go to the top of the page
 
+
Larry Larsen
post Feb 27 2012, 11:46 AM
Post #6

UA Editor + Utterly Certified
Posts: 23,087
From: Melton Mowbray,Leicestershire (U.K)



(IMG:style_emoticons/default/yw.gif)
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Search  ·  Go to Top  ·  Lo-Fi Version Time is now: 24th April 2014 - 11:08 AM