Automatic Decimals I dont want

G

Guest

I have a drop down box on my form that is adding a decimal and 2 zeros to
everything in the list. The format is set to fixed with 0 decimals for the
combo box, the query, and the source table. When I select one of the numbers,
the decimals dissapear. The problem lies with the fact that I am trying to
open a form based on the combo box matching a field on the form and its not
working (Im assuming due to the extra decimals. Please help!
 
M

ManningFan

I would bet that you missed something somewhere. If the combo is set
to display 0 decimals and the field in the table is set to display 0
decimals, there's no reason why you should see any more than 0
decimals.
 
G

Guest

Ive checked God knows how many times and they are both set to 0, and they are
still showing up. Ive deleted and restarted, Ive run every diagnostic tool I
know of and I cant get rid of them.
 
G

Guest

Reset the field's format to "fixed" then set the decimals to 0

Hope this helps

--
Wayne
Manchester, England.
Not an expert.
Enjoy whatever it is you do.
 
G

Guest

Thats one of the first things I tried. I also tried double. The format is
fixed with 0 decimals.
 
R

RoyVidar

Hendricks97 said:
I have a drop down box on my form that is adding a decimal and 2
zeros to everything in the list. The format is set to fixed with 0
decimals for the combo box, the query, and the source table. When I
select one of the numbers, the decimals dissapear. The problem lies
with the fact that I am trying to open a form based on the combo box
matching a field on the form and its not working (Im assuming due to
the extra decimals. Please help!

I think the contents of the list (drop down) is text, so I think you
need to format this in the underlying query, se below.

I think numbers of field size byte, integer and long integer would
normally display without decimals, but fields with field size single,
double and decimal, and fields of type currency, will display with two
decimals (currency, I think would probably display with the local
currency symbol).

select textfield, format(num1, "#"), format(num2, "#"), ...
 
G

Guest

I must be misunderstanding what you told me. The field name is SKU and it has
6 digits from the table Recall, heres what I have for the query:
SELECT
Recall.SKU,format(num1,"#"),format(num2,"#"),format(num3,"#"),format(num4,"#"),format(num5,"#"),format(num6,"#"),
FROM Recall
ORDER BY Recall.SKU;
When I tried this I got an error message stating:
The SELECT statement includes a reserved word or an argument name that is
misspelled or missing, or the punctuation is incorrect.
 
R

RoyVidar

Hendricks97 said:
I must be misunderstanding what you told me. The field name is SKU
and it has 6 digits from the table Recall, heres what I have for the
query: SELECT
Recall.SKU,format(num1,"#"),format(num2,"#"),format(num3,"#"),format(num4,"#"),format(num5,"#"),format(num6,"#"),
FROM Recall
ORDER BY Recall.SKU;
When I tried this I got an error message stating:
The SELECT statement includes a reserved word or an argument name
that is misspelled or missing, or the punctuation is incorrect.

Do you have fields named num1, num2 ... num5?

You need to use your own field names. If it is only one field, and it's
named sku, then perhaps the following would work?

select format(sku, "#") from recall order by sku

or you could perhaps use

select int(sku) from recall order by sku

But looking at your initial post - I don't see how you can be able to
select something when you truncate the field in the combo - you won't
get any match with that on numbers having decimals.

I suppose I'm not understanding what it is you're trying to do.
 
G

Guest

That worked!!! Thank you so much

RoyVidar said:
Do you have fields named num1, num2 ... num5?

You need to use your own field names. If it is only one field, and it's
named sku, then perhaps the following would work?

select format(sku, "#") from recall order by sku

or you could perhaps use

select int(sku) from recall order by sku

But looking at your initial post - I don't see how you can be able to
select something when you truncate the field in the combo - you won't
get any match with that on numbers having decimals.

I suppose I'm not understanding what it is you're trying to do.
 

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