Need to Pad Zeros

D

Dee

I have to count the records and show the count in a field
that's 8 characters long, zero-filled [i.e. 00000023].
Each day the count will be different and the number could
be 1,23,345,or 2000.

I can only think to check the length of the final ttl and
then pad the field with "00" based on length.

Do I do that with a module? Not sure how to get started
or the right commands...

Would appreciate any help...
Thanks in advance,
Dee
 
J

John Vinson

I have to count the records and show the count in a field
that's 8 characters long, zero-filled [i.e. 00000023].
Each day the count will be different and the number could
be 1,23,345,or 2000.

I can only think to check the length of the final ttl and
then pad the field with "00" based on length.

You're making it MUCH harder than it needs to be.

Set the Control Source of a textbox on your form to

=DCount("*", "[name of your table]", <optional criteria>)

Set the Format property of the textbox to

"00000000"
 

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