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?


--------------------
- Scot
Go to the top of the page
 
+
Larry Larsen
post Feb 27 2012, 09:51 AM
Post #2

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



Hi Scot

Sorry are we simply trying to format the results..!!!
thumbup.gif


--------------------
"Time...We have exactly the same number of hours per day that were given to Helen Keller, Pasteur, Michaelangelo, Mother Teresa, Leonardo da Vinci, Thomas Jefferson, and Albert Einstein"
H. Jackson Brown
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.


--------------------
- Scot
Go to the top of the page
 
+
Larry Larsen
post Feb 27 2012, 10:59 AM
Post #4

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



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

thumbup.gif


--------------------
"Time...We have exactly the same number of hours per day that were given to Helen Keller, Pasteur, Michaelangelo, Mother Teresa, Leonardo da Vinci, Thomas Jefferson, and Albert Einstein"
H. Jackson Brown
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. frown.gif Always another way to skin the cat.


--------------------
- Scot
Go to the top of the page
 
+
Larry Larsen
post Feb 27 2012, 11:46 AM
Post #6

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



yw.gif


--------------------
"Time...We have exactly the same number of hours per day that were given to Helen Keller, Pasteur, Michaelangelo, Mother Teresa, Leonardo da Vinci, Thomas Jefferson, and Albert Einstein"
H. Jackson Brown
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 July 2014 - 09:37 AM