View Full Version : Combo.Column(#) formatted as currency?


casey
12-20-2000, 07:37 PM
I'm using a combobox and several textboxes to display information. The textboxes display the proper values, however, the prices aren't being displayed as currency. I've set the format of the textbox as currency, but this doesn't work. How do I format a textbox as currency?

Ex:textbox's ControlSource = Combo9.Column(1)

Any ideas?

Jack Cowley
12-20-2000, 07:59 PM
If your text boxes are not bound to a field on a table the currency format does not show. If the text boxes are bound then you should see the proper currency display. This is a new one on me as I was trying to see what was happening for you and this is what I discovered. Maybe someone knows a way around this.....

casey
12-20-2000, 08:45 PM
Sorry if I was being too vague.

All of the textboxes are unbound. The combobox is unbound as well. The combobox's data is based on a query that selects all of the fields of each record from a table. Each textbox is assigned to a particular column of the combobox. When a record is selected in the combobox, each textbox is assigned to a single column from that record. The intent is to display each column of the combobox in a more organized way (instead of having all columns in one combobox). I can view all of the columns in the combobox and the prices are formatted as currency there. However, when the same column is displayed in a textbox, it is not formatted as currency.
I hope I've stated my problem clearly. Thanks

Jack Cowley
12-21-2000, 06:11 PM
Hmmm. Why do you not just base the form directly on the query? You can still use the combo box (modified) to find a record to display. You can still arrange your text boxes on the form any way you like so you can get the display that you want. Maybe I missunderstood what you are doing but I can not think of a reason to go through the steps you are going through.

casey
12-21-2000, 07:04 PM
If my logic seems unorthodox, it's because I'm still getting the hang of how Access handles data.

The form I'm using is based on a different query and I guess that I was trying to get away from using a subform because of aesthetics. Though, I thought what I was attempting was common.

I'm still learning and I appreciate your advice. No need to reply because I'll try a different approach.

Thanks.

Pat Hartman
12-22-2000, 08:59 PM
You can specifically format the data with the format() function:

Ex:textbox's ControlSource = Format(Combo9.Column(1), "Currency")

FYI "Currency" is one of the "named" numeric formats, look in help for other "named" options as well as user defined options.

casey
12-23-2000, 10:45 AM
Thanks Pat. That did the trick.