Format Function


B

banker123

I have the follwing text in a table.
10
100
1000

I would like to format the data to output as displayed below. Zero
fill, 5 characters not including the -, right justified, the negative
sign immediatley preceding the text.

000-10
00-100
0-1000

Thanks for the assitance!
 
Ad

Advertisements

J

Jerry Whittle

Debug.Print String(5-Len("100"),"0") & "-" & "100"

In a query:
Padded: String(5-Len([TheFieldName]),"0") & "-" & "[TheFieldName]"
 
Ad

Advertisements


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