• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 362
  • Last Modified:

Field appearing as text field in access query

I have a Select query that returns a value based on an IIF and DLookup statement.  I am looking up a number in another table, based on a number falling between 2 numbers.  However, the query returns a text field, and even if I format it as a number via Field Properties, it is still seen as a number when I sort the column or download the data to excel. It also doesn't allow me to select the number of decimal places.  Any ideas?
0
GIStewart
Asked:
GIStewart
1 Solution
 
LucasCommented:
Typecast your field to either:

Val(yourfieldname)
Clng(yourfieldname)
Cdbl(yourfieldname)

Look up typecasting in help for more information.
0
 
GIStewartAuthor Commented:
Thank you.  Val(fieldname) worked just as I was hoping
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now