Jump to content
Sign in to follow this  
mrpez1

Reset Serial Numbers to 001 not 1

Recommended Posts

I can manually set the auto-enter serial numbers to 001 and the placeholding zeros will remain. When I use the Set Next Serial Value script, it doesn't accept the placeholding zeros. Instead of 001 I end up with 1. Does anybody know of any way around this?

Share this post


Link to post
Share on other sites

Try adding some characters before the zeros. Like SN001, SN002. You can increment a mixed character string like that.

Share this post


Link to post
Share on other sites

Hi,

A serial number would always behave that way.

In fact, when you want an ID to behave as ID001, ID002,...you'd use a serial and an auto-entered text calculation.

Serial : auto-entered

t_ID = autoenter calc ---> "ID"&Right("000"&Serial;5)

This is only one example...

Share this post


Link to post
Share on other sites

That did the trick....My serial # format is 003-001 (last 3 digits of year and numerical serial). I just added the dash to the numerical serial instead of adding it in a later calc and the 0's don't get dropping.

Thanks!

Share this post


Link to post
Share on other sites

Hmm. I make all my autokey fields text, just Autoenter Serial Number "TXT001" and check Increment By 1. It's always worked for me. They're text fields, of course - is there something I'm missing?

Share this post


Link to post
Share on other sites

No your not...

But Mprez was concerned about the script step "set next serial number".

I should have asked why he used this script though.

Share this post


Link to post
Share on other sites

I was using the set next serial step b/c my serial number convention works like so: first three digits = last 3 digits of year project started, then a dash, last 3 digits = numerical serial number. I.e. 003-001 or 004-304. I have a script that check every time the database is opened to see if the current year (-left most digit) does not equal the first 3 digits of the last record's serial. If that is the case, it resets the second part of the serial to -001. The first three digits are set by the current year function.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.