Solved

QUERY EXPRESSION IN ACCESS GIVING WRONG FORMAT

Posted on 2007-04-03
3
174 Views
Last Modified: 2010-03-20
I HAVE AN EXPRESSION THAT THAT IS A NUMBER BUT WHEN I EXPORT TO EXCEL THE FORMAT IS IGNORED.  IT APPEAR THERE IS A SPACE IN FRONT THAT NEEDS TO BE DELETED.  HOW CAN CHANGE THE QUERY EXPRESSION TO IGNORE THE SPACE.
0
Comment
Question by:kdr2003
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 9

Expert Comment

by:TheSloath
ID: 18846681
Use the Trim function, e.g. with field MyNumber from table MyTable:

SELECT Trim([MtNumber]) FROM MyTable
0
 

Author Comment

by:kdr2003
ID: 18847683
Didn't work
0
 
LVL 9

Accepted Solution

by:
TheSloath earned 500 total points
ID: 18847798
Trim removes any spaces from around text.

Try CDbl(Trim([MtNumber])) to force the field to a 'Double' data type (Use CLng rather than CDbl if it is an integer)
0

Featured Post

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In database programming, custom sort order seems to be necessary quite often, at least in my experience and time here at EE. Within the realm of custom sorting is the sorting of numbers and text independently (i.e., treating the numbers as number…
If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question