Full Version: Using Ccur Within A Text Field Value
UtterAccess Discussion Forums > Microsoft® Access > Access Modules
Scot
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?
Larry Larsen
Hi Scot

Sorry are we simply trying to format the results..!!!
thumbup.gif
Scot
Opps, how did I miss saying that. Yes, I want to format the inserted field comment.
Larry Larsen
Hi
Try using some thing like:
CODE
"bla bla " & FormatCurrency([Me.Txt_SumUnpaid],2) & "bla bla"

thumbup.gif
Scot
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.
Larry Larsen
yw.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.