Solved

QUERY EXPRESSION IN ACCESS GIVING WRONG FORMAT

Posted on 2007-04-03
3
169 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
  • 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now