1. ## Help with numbers

I need to assign a USPS cert # of 20 digits to new records in multiple tables. The first 2 digits in the cert # do not change, the next 9 digits do not change ( all of which are added by setting the default value), the following 2 digits' value is taken from a form field in which the user chooses from a combo box. The next 6 digits are generated in a table as an auto number with default value "0", format 000000. These 6 digits will be often be taken from tables generating auto numbers per record. The exclusivity is acquired by the 2 digit combo box #. The last digit is a check digit arrived at by a simple calculating matrix. I have brought the 19 digits together on a form, isolated each digit to a separate field (1 thru 20), and built the calc formula into digit 20 to define the check digit. The PROBLEM is...for record # 000001, I haven't been able to find a way to isolate the zeros into a separate field, and therefore they do not calc. for the check digit. I have tried RIGHT([Sequence Number],1) which returns "1" (for sequence # 000001), but using LEFT([Sequence Number],1) for sequence # 000001, also returns "1". The final cert # is being put into a form field like this..[dig20]&[dig 19], etc. Any Ideas ?

2. ## Re: Help with numbers

When you display an autonumber in a format like "000000", it doesn't change what's in the field, which is why your attempt to parse out the zeroes fails--they aren't really there. You will have to determine the length of the autonumber and then insert (6-length of the autonumber) zeroes into the field.

3. ## Re: Help with numbers

Are you generating the 20 digit ID correctly? The format of 000000 is for display on screen/printout. You may need to use format\$(n, "000000") to 'force' the zero's into the ID.

4. ## Re: Help with numbers

Charlotte, Thank you for your prompt response. I know the autonumber will be no more than six digits, but it will start at 000001, and end at whatever # of records, where the next batch of records would continue. Would it be better to have the user enter a six digit beginning sequence number, and plug that in to the matrix, then identify the ending sequence number for the user to enter for the next set of records? If so, how do I assign the starting/ ending numbers? I was thinking of a table to record assigned cert #'s. Could I create an input form to accept a beginning #, record that in the table, add the imported record #'s, add a value of one to the beginning # for each record, and have the table generate a new number for each batch of records?...Thanks

5. ## Re: Help with numbers

Andy, thanks for the info, unfortunately, I am snowbound in the northeast U.S., and don't have the app with me today.I will try a test file, in the format you mentioned.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•