I have a query that subtracts one date from another, returning the
number of days. The field is certainly numeric. But when I bring this
field into another query, Access interprets it as a text field. There
are no possibilities of any of the records being null or having text.
How do I get this query to understand it is numeric?
I believe it is happening because of the right join in the query. But
I am not sure.
Thanks,
Matt
Allen Browne - 23 Jun 2005 17:04 GMT
Typecast the query field.
Details in:
Calculated fields misinterpreted
at:
http://allenbrowne.com/ser-45.html

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I have a query that subtracts one date from another, returning the
> number of days. The field is certainly numeric. But when I bring this
[quoted text clipped - 9 lines]
>
> Matt
james.igoe@gmail.com - 23 Jun 2005 17:07 GMT
Guessing, but it might be converting a date value to text, so convert
it to number, via cInt() or cDbl() before passing it to query.
doyle60@aol.com - 23 Jun 2005 20:08 GMT
Thanks. I got it to work but I had the wrong problem. I didn't
realize that it was actually the Filter expression that needed shaping
up; a point that could be added to that helpful tip sheet. I believe
there is some sort of statement about doing this on the properties of
the control. But that did not help in my case.
Thanks so much,
Matt