Format TextBox to Currency in a Form

J

Jay

Hi,
I am having trouble formatting textbox in a form.
Here is a little background on what i did in a form. I have a combobox that
has all the company names. I am populating textbox results by selecting
company name from the combobox. For Example, If i select CompanyA from the
combobox then the textbox1 will populate its revenue. But, its populating in
a general number format without any decimals.
I tried everything from changing the property in the textbox and the source
table.
But i have no luck getting the Currency in the format.

Can someone please help me with my isssue.

Thank you,

Jay
 
J

Jeff Boyce

Jay

If this were mine, I'd open the form in design view, click on the (textbox)
control, click on the Properties Toolbar button, select the Format property
and select Currency.

What happens when you try this?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

Jay

Jeff
When i try what you suggested....it doesn't change anything. It will still
show up as general number format.
 
J

Jay

So i found the solution thru our great memeber (Allen Browne) from this
community.
So if the textbox is spitting out results based on combobox then you would
type the following in the control source of the textbox:
CCur([ProductID].[Column](2))
And make sure the format of the textbox is Currency and it will work fine.

Thank you guys for all the help
 
R

Robert de Kock

I had the this problem with data from a list box going into a text box. In my case however, Ccur([theListBox].Column(theColumn)) didn't seem to work.

My workaround is

dim theVar as Currency ' (or could be any numeric type)
....
theVar = [theListBox].Column(theColumn)
theTextBox = theVar
....

Best wishes


EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top