Leading zero's while exporting to excel

G

Guest

Hi
In the database, field is formatted is text and the data is account no
0101893672, while exporting the data through (Query >Report) to excel format
leading zero is not visible in the excel sheet e.g 101893672.

I need to have this zero visible in the excel format, how can i do that.

Thanks in advance

Ron
 
J

Jeff Boyce

Rony

Before you export it, in a query, convert it to a string of characters.
Leading zeros in number (real, actual, add-subtract-multiply-divide numbers)
are dropped because they're meaningless.

In your example, they aren't really numbers, but an identifier that happens
to use digit characters.

You can use the CStr() function in your query to do the conversion.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Thanks, please note I am exporting the proccessed (through query) data to
excel from my report, Data in report indicates leading zero , but when I
export to excel the leading zero is not indicated, any solution in report
format itself.

Thanks\
Ron
 
J

Jeff Boyce

Ron

In the report definition, can you set the format of the control to the type
you want?

If not, then reconsider, and use a query as suggested.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top