Right Justify on export; Joe Fallon might be interested

M

Mike

Hi,

Currently I can use:

strData = Format(![Account Number], "##########")

to write out a text field on an export file. However I'm trying to
right-justify the field (it's of varying length to a maximum of 9
characters), and picked up the following from a previous post of Joe Fallon's
on the subject:

'this is how to right justify an entry
strData = strData & Space(14 - Len(Format(![Qty], "0.0000"))) &
Format(![QtyRcv], "0.0000") '13-26

I've therefore adjusted my code to read:

strData = strData & Space(9 - Len(Format(![Account Number], "##########")))

which looks like I've made the correct alterations, but my output file
appears to be empty.

Any ideas why? XP pro and Access 2002 file format if it helps.

Thanks in advance,
Mike
 
R

Rover

to Right justify, I THINK you want:
strData = Space(9 - Len(Format(![Account Number], "##########"))) &
Format(![Account Number], "##########")
 

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