?
Solved

QUERY EXPRESSION IN ACCESS GIVING WRONG FORMAT

Posted on 2007-04-03
3
Medium Priority
?
175 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 2000 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

771 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