Whats controlling these decimals?

Jakboi

Death by Access
Local time
Today, 04:04
Joined
Nov 20, 2006
Messages
303
Hello,

Dont understand what is controlling these decimals. I dont need any decimals for this database. The currency is talking bout money in 1000's and the probability is whole numbers.

Here is where I cant get the decimals to stop:

untitled2pl2.png

untitled3pa6.png

untitled3lk8.png


I have tried different things but no luck...anyone have any suggestions.

Thanks.
 
You have to format your output in each of your outputs (queries, reports, forms, etc). It won't take the formatting you set in the table. That's a "feature" (albeit not so fun at times).
 
Why is your format for your tblAmount_ID Currency?
It might be picking up that format if you do not specify another.
Just a thought.
 
FoFa - it IS picking up that format as I mentioned. It displays the datatype based on the datatype defaults, unless you specify otherwise in the forms, queries, reports, etc. that you want them displayed in. Changing the decimal property in the table only lets the table to know not to store anything after the decimal, but it doesn't stop it from formatting as the currency default in the queries, forms, and reports unless you specifically tell it not to display them within those objects.
 
Ok. Then here is where I am trying to prevent it from showing in my frmmain:

4eo2.png


This is my query search which is for my frmmain:

untitled5rb7.png


This is the design of that:

untitled6jj9.png


Would this be the area where I could change that, somewhere within these?

Thanks.
 
Last edited:
Rowsources for combos and listboxes are a bit PITA for numbers, as it seems they completely disregard any field formatting. The solution, I think, is to use the format function in your query, which will convert the number to string. For instance

MyAmount: Format(Amount, "$#,##0")

This also makes it possible to do some very tiny adjustment, for instance

MyAmount: Right(Space(30) & Format(Amount, "$#,##0"), 30)

Which might right align the numbers, providing you can live with a font like for instance Courier New. There are more possibilities for this at Lebans, too, see for instance http://www.lebans.com/justicombo.htm
 
Thanks for answers.

Ok, I tried to check out the examples on that lesbans but they wouldnt open. So is this on the right path:

Like "*" & [Forms]![frmMain]![txtSearch2] & "*" & Format("Amount","$#,##0")

Change it for the control that displays it in your FORM.

Thanks as well for help. What would that be called, I assume its under "format" when designing the form, but not sure what I am looking for..
 
No, the converting of the amount field should not be in the where condition, but by creating a new calculated field, for instance as in my sample

MyAmount: Format(Amount, "$#,##0")

This means the above to be typed/copy pasted into the field row in the query grid.

In SQL view of the query, it should probably look like

SELECT <your field list>, Format(Amount, "$#,##0") as MyAmount, CLASSIFICATION FROM...

(maybe the quotes are doubled up in SQL view, though)

Stephen Lebans samples are in zip format. After unzipping, you should be able to open them in 2000+ versions.
 
Thank you. That did it. I am rather new and really appreciate it. Thanks.
 
No, what I asm saying is why is an ID formatted as currency?
Just change the format to nothing/general as shown
 

Attachments

  • temp.jpg
    temp.jpg
    33.5 KB · Views: 104

Users who are viewing this thread

Back
Top Bottom