AllExperts > Using MS Access 
Search      
Using MS Access
Volunteer
Answers to thousands of questions
 Home · More Using MS Access Questions · Answer Library  · Encyclopedia ·
More Using MS Access Answers
Question Library

Ask a question about Using MS Access
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Scottgem
Expertise
I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience
I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

 
   

You are here:  Experts > Computing/Technology > Business Software > Using MS Access > Generate Alphanumeric ID in Access Form

Using MS Access - Generate Alphanumeric ID in Access Form


Expert: Scottgem - 11/3/2009

Question
I found where Scottgem had helped another Access 2007 user with generating an alphanumeric ID ( http://en.allexperts.com/q/Using-MS-Access-1440/2009/5/Generate-Alphanumeric-ID-... ) and I tried re-creating the solution using some test data/fields and have encountered a "Compile Error" when I click the button. I'm sure I've done something wrong and was hoping you might be able assist me.

I have a very simple table so far "tbl_Contracts" it has only a few fields (BeginDate, ContractNumber and AgencyConNum)as I'm trying to get this problem solved before moving on (to others).

Ultimately I want a number that shows similarly to the answer given to Gosnel, I'd like it a little different "ABCD-###-FY" where the ###'s will count up using the Dmax function and FY would be the current fiscal year (our FY runs "July 1 - June 30" so today 11/03/2009 would be FY 2010).

My test database had only a table and a form, so I've got to be missing pieces of the solution.  Any assistance or samples would be GREATLY appreciated.  It would be extremely helpful if you could create a dead-simple test database and email it to me, I understand completely if this is not possible.

Thank you in advance for your assistance,
Greg  

Answer
It would help to see exactly what you have done. If I follow you are using a button to generate the number, so let me see the code behind the button. Also, because your fiscal year is NOT the calendar year, you have to have a way to identify the fiscal year. Finally, is ContractNumber supposed to be the sequential number or did you add another field?

Hope this helps,
Scott<>
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.