Again w/ Combo Boxes!

SillyMcGilly

New member
Local time
Today, 07:20
Joined
Aug 6, 2003
Messages
7
I have searched this forum and found everything I need to know about combo boxes...BUT this.

I have a table "tbldata" with 3 columns (ID, #People, Target).
In table design view the #People and Target are set up as Single precision, Fixed numbers with ZERO decimal places.

On my form I have a combo box that looks up the 3 columns I have in tbldata (the ID column is hidden).

Here is the question. Why does it display in the combobox the #People and Target fields with TWO decimal places?? The combobox is bound by ID, but I choose to display #People on the form and it also displays with TWO decimal places once selected.

I want it to show ZERO decimal places. The properties on the combobox are set to Fixed, ZERO decimal places, but TWO still pop up. HELP. I only have so much room and these decimal places are killing me.
 
Pat, I tried to set the properties of the SQL statement used in the row source. I clicked on the "3dots" to enter the query builder, selected the "#of People" field and chose Fixed, 0 decimal places. It then asked me would you like to save the changed SQL, I said yes. But the 2 decimal places are still there?? and when I go back into the query builder, the properties I set are cleared??

Maybe I am just doing something really stupid, not sure. Can you set properties directly in the SQL statement? Here it is.

SELECT DISTINCTROW tbltargetinfo.[# of People Target], tbltargetinfo.[Target Name] FROM tbltargetinfo WHERE (((tbltargetinfo.[APT ID])=[Forms]![frmEnterData].[APT ID])) ORDER BY tbltargetinfo.[# of People Target] DESC;

Thanks!
 
Pat, I figured it out. Yes, I believe I could have simply used an integer for the # of People box, but I do use Single and Double on others, that still would pop up with the wrong # of decimal places.

All I did was goto the tblTargetInfo and change the format from "Fixed" to blank. I don't know why this works?, but when I select the combo box, the decimal places seem to fall where I want.
 

Users who are viewing this thread

Back
Top Bottom