auto number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a autonumber field that is my primary key. I would like to be able to
put
07- in front of the numbers so that always is there. Is there a way to do
this? If so how would I do it?
Example:
07 - 01
07 - 02
07 - 03 etc. Any help would be greatly appreciated. Thanks in advance.

Mary
 
I'm guessing the "07" is for the year?

That is a separate piece of information. Create a separate field in your
database to store the year (unless you already have a date field). Then, in
your forms, reports, and queries, you can concatenate the two items. If you
already have a date field, you can simply pull out the year and concatenate
it.

In a form or report, for example, add an unbound text box with the
following...

=Format([yourdatefield],"yy") & "-" & [your autonumberfield]
 
Remember a couple of things about 'autonumber' fields --
They skip a number every once in awhile.
They can not be reset at the begining of the year.


Rick B said:
I'm guessing the "07" is for the year?

That is a separate piece of information. Create a separate field in your
database to store the year (unless you already have a date field). Then, in
your forms, reports, and queries, you can concatenate the two items. If you
already have a date field, you can simply pull out the year and concatenate
it.

In a form or report, for example, add an unbound text box with the
following...

=Format([yourdatefield],"yy") & "-" & [your autonumberfield]



--
Rick B



Mary said:
I have a autonumber field that is my primary key. I would like to be able
to
put
07- in front of the numbers so that always is there. Is there a way to do
this? If so how would I do it?
Example:
07 - 01
07 - 02
07 - 03 etc. Any help would be greatly appreciated. Thanks in advance.

Mary
 
Rick,

Yes it is for the year. Where do I enter the information on the form and
report? Can I change this every year? Thanks for your help.

Mary

Rick B said:
I'm guessing the "07" is for the year?

That is a separate piece of information. Create a separate field in your
database to store the year (unless you already have a date field). Then, in
your forms, reports, and queries, you can concatenate the two items. If you
already have a date field, you can simply pull out the year and concatenate
it.

In a form or report, for example, add an unbound text box with the
following...

=Format([yourdatefield],"yy") & "-" & [your autonumberfield]



--
Rick B



Mary said:
I have a autonumber field that is my primary key. I would like to be able
to
put
07- in front of the numbers so that always is there. Is there a way to do
this? If so how would I do it?
Example:
07 - 01
07 - 02
07 - 03 etc. Any help would be greatly appreciated. Thanks in advance.

Mary
 
As I said, you would create an unbound textbox and include the data I
indicated in my first post. Do you have a date field in your table? If so,
pull the year out of it and concatenate the autonumber.

As another poster pointed out though, the autonumber would not reset each
year.

--
Rick B



Mary said:
Rick,

Yes it is for the year. Where do I enter the information on the form and
report? Can I change this every year? Thanks for your help.

Mary

Rick B said:
I'm guessing the "07" is for the year?

That is a separate piece of information. Create a separate field in your
database to store the year (unless you already have a date field). Then,
in
your forms, reports, and queries, you can concatenate the two items. If
you
already have a date field, you can simply pull out the year and
concatenate
it.

In a form or report, for example, add an unbound text box with the
following...

=Format([yourdatefield],"yy") & "-" & [your autonumberfield]



--
Rick B



Mary said:
I have a autonumber field that is my primary key. I would like to be
able
to
put
07- in front of the numbers so that always is there. Is there a way to
do
this? If so how would I do it?
Example:
07 - 01
07 - 02
07 - 03 etc. Any help would be greatly appreciated. Thanks in
advance.

Mary
 

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

Back
Top