sequentially numbered text field - not autonumber

A

Angel

I am trying to create a field that will auto assign a +1 number that begins
with a fixed set of characters (09_) and also shows the preceding zeros in
the unique number (0001, 0002, etc.). I have been diligently trying to read
the other posts to find a solution, but haven't figured it out yet. I see
that I can't use the autonumber field, and I think that I need to use the
DMax function, but I can't figure out how to get the zeros to show. Here is
an example of what I need to be in the field:

09_0001
09_0002
09_0003

I would greatly appreciate any help that you can provide! Thanks!
 
J

Jerry Whittle

It it's always 09_ why bother to store it? Also they are leading zeros, why
bother to store them? Just put in the sequential number and format it to look
as you want in queries, forms, and reports.

Format("22", "\09_0000")
or
Format(22, "\09_0000")

Both return 09_0022
 
A

Angel

That makes a lot of sense - I think I was trying to make this more
complicated than it really is. I've got the DMax function working in the
default value of the ID field on the form, but I'm having trouble getting the
format to work in the form (please forgive my ignorance - I am a self-taught
user). I typed "\09\_0000" in the Format control of ID on the form, but this
isn't working. Do you have any suggestions?
 

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