Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create unique identifier automatically with VBA

Status
Not open for further replies.

rubbernecklove

Programmer
Jun 19, 2008
1
US
Hi, my name is Natalie and I'm hoping I can find some help with this issue. Currently, I am using Microsoft Access to create databases that track projects per our fiscal year Oct 1-Sept 30. The projects get a unique number assigned to them: "2009-0001-CX". "2009"=Year project was received, "0001"=project number, "CX"=type of document that is going to be written.

Each fiscal year, I create a new database for that year so the projects can start off with "1" again. Management would like me to create a database that contains multiple years of projects. That way, they can pull reports for multiple years and all the projects entered into the database can be reviewed out of one database, not several for each year.

So far, these three fields are filled out in the database, the Year is the date the project was received but entered as "01/01/2008, the project number is an autonumber, and the document type is filled out. How do I create a primary key based off these fields and then be able to utilize this primary key in relationships? I have relationships built between several tables just using the autonumber. I was wondering if there is a way in VBA to create code that knows which fiscal year the project falls in, then creates the primary key? Thank you for your time.
Natalie
 
This is not an "Access" discussion, but rather one for "Lotus Approach". Posting in the proper discussion will likely get you an answer.

Sue Sloan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top