D
DBenedict
Office Professional 2003.
I've looked through a few posts but haven't found any that address all of my
needs (or requests).
I'm assisting with a project database that has an ID field like, TS-0700001.
The "TS-" is text representing the department, the "07" is the current
year, the "00001" is a number that increases by 1 for each new project.
(I think I will modify it so the text portion “TS†is taken from a combo box
so we can select other departments. In that case, letters could be “TSâ€,
“QCâ€, “RD†and it would come from a field. This make it easier to insert
into an ID than just inserting plain text?)
Currently, the ID field in the table is set to AutoNumber and the Format is
set to "TS-07"00000. This is wrong. Each year the format has to be
updated to increase the year portion of the ID. To do this, they create a
new table and change the Auto Number format to "TS-08"00000. This prevents
old “07†records from being changed to “08†and it also starts the project
numbers over at 00001.
What I need to design is this. For each new project, an ID is generated
using a button on a form.
The ID is built using the combo box field "TS-", then it adds the year in
the format of "yy", then it finds the next project number and finally, saves
the ID in the ID field.
In addition, they want project numbers to recycle or restart at “0†each
year. If the last record for 2007 is TS-0704515, the new record for 2008
should be TS-0800001. There is no possibility of passing 99999 projects.
Also, I have to consider a multi-user environment. I think I should create
the ID and save it to the table instantly so it can't be duplicated or
conflict with another user.
So this is it. From the open form I would create the ID, save it to the
table, populate the form with the new ID so it can be edited without
interfering with someone else who may be creating their own record.
I could leave the table field as a number and use formatting on the Forms
and Reports to create the illusion of a custom ID. (TS-0704515). But I'd
prefer to create it and save it as TS-0704515.
I'm sure the Data Type can't be Auto Number in this case, so probably text?
I am open any suggestions.
Thanks, Dan
I've looked through a few posts but haven't found any that address all of my
needs (or requests).
I'm assisting with a project database that has an ID field like, TS-0700001.
The "TS-" is text representing the department, the "07" is the current
year, the "00001" is a number that increases by 1 for each new project.
(I think I will modify it so the text portion “TS†is taken from a combo box
so we can select other departments. In that case, letters could be “TSâ€,
“QCâ€, “RD†and it would come from a field. This make it easier to insert
into an ID than just inserting plain text?)
Currently, the ID field in the table is set to AutoNumber and the Format is
set to "TS-07"00000. This is wrong. Each year the format has to be
updated to increase the year portion of the ID. To do this, they create a
new table and change the Auto Number format to "TS-08"00000. This prevents
old “07†records from being changed to “08†and it also starts the project
numbers over at 00001.
What I need to design is this. For each new project, an ID is generated
using a button on a form.
The ID is built using the combo box field "TS-", then it adds the year in
the format of "yy", then it finds the next project number and finally, saves
the ID in the ID field.
In addition, they want project numbers to recycle or restart at “0†each
year. If the last record for 2007 is TS-0704515, the new record for 2008
should be TS-0800001. There is no possibility of passing 99999 projects.
Also, I have to consider a multi-user environment. I think I should create
the ID and save it to the table instantly so it can't be duplicated or
conflict with another user.
So this is it. From the open form I would create the ID, save it to the
table, populate the form with the new ID so it can be edited without
interfering with someone else who may be creating their own record.
I could leave the table field as a number and use formatting on the Forms
and Reports to create the illusion of a custom ID. (TS-0704515). But I'd
prefer to create it and save it as TS-0704515.
I'm sure the Data Type can't be Auto Number in this case, so probably text?
I am open any suggestions.
Thanks, Dan