Union Queries - Results showing as text & not numbers

  • Thread starter Thread starter Clive
  • Start date Start date
C

Clive

To cut a long story short, i've got a union query that is a full outer join
of 2 tables.

Anyway, the results i have got back needed formatting to no decimal places.

How do i do that?

I've tried leaving it as it is and formatting it in the report, but it still
doesn't format and i can't total it up.

It's like it is showing as a text and not number.

Is there a way of converting the result to a number, particularly within a sql
 
Using the Format() function has the effect of turning the result into text.

Could you use the Round() function instead?
 
Thanks for your reply

I've tried using these. It appears to change the look of the number, but it
still treats it like a text field and not numeric.
 
When you view the column, do the values left-align (like text) or
right-align (like numbers)?

Any function that returns a variant - such as Nz() - also has the effect of
causing JET to treat the result as text.

If necessary, typecast the value with CDbl() or CLng() or whatever.
Unfortunately, these functions can't handle Null, so you may need to use
Nz() inside them.
 
Thank you Allen, this has helped a lot

Allen Browne said:
When you view the column, do the values left-align (like text) or
right-align (like numbers)?

Any function that returns a variant - such as Nz() - also has the effect of
causing JET to treat the result as text.

If necessary, typecast the value with CDbl() or CLng() or whatever.
Unfortunately, these functions can't handle Null, so you may need to use
Nz() inside them.
 
Back
Top