field as number

R

Ra

I have a make table query. One of the fields has the following expression:

“Total : IIf(Nz([Sum Defects Current Month].[SumOfDefects])=" ","0",([Sum
Defects Current Month].[SumOfDefects]))â€.
I set up the field parameter in the query to a general number.

However after making the table I get the field in the new table as text.
Please advise on how to get the field in the table as number, not text.

Thank you,

Ra
 
D

Duane Hookom

Use 0, not "0". You need to understand the difference numbers and text. "0"
is a text expression while 0 is a numeric expression. I think you can get by
with

Total : Val( Nz([Sum Defects Current Month].[SumOfDefects],0) )
 
R

Ra

Thank you so much, you are great. It is working fine.

Ra


Duane Hookom said:
Use 0, not "0". You need to understand the difference numbers and text. "0"
is a text expression while 0 is a numeric expression. I think you can get by
with

Total : Val( Nz([Sum Defects Current Month].[SumOfDefects],0) )

--
Duane Hookom
Microsoft Access MVP


Ra said:
I have a make table query. One of the fields has the following expression:

“Total : IIf(Nz([Sum Defects Current Month].[SumOfDefects])=" ","0",([Sum
Defects Current Month].[SumOfDefects]))â€.
I set up the field parameter in the query to a general number.

However after making the table I get the field in the new table as text.
Please advise on how to get the field in the table as number, not text.

Thank you,

Ra
 

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