PC Review


Reply
Thread Tools Rate Thread

Access 2000 - unique identifiers

 
 
JTS
Guest
Posts: n/a
 
      17th Dec 2009
The business wish to have a unique identifier which is month, year, nnn where
n starts at zero each month and is sequential as each quote comes in until
the end of the month. Whereby the sequential numbers begin at zero again.

For example the 43rd quote this month would have a reference number of
12/09/043

To avoid duplication they wish Access to prompt with the new reference
number when they access the new quote form.

Can this be done?
 
Reply With Quote
 
 
 
 
Dorian
Guest
Posts: n/a
 
      17th Dec 2009
Put your identifier in a column with a unique index.
Then from the Date and DatePart functions (look in HELP) you get the current
year and month. The you do a DMAX function (look in HELP) on this table to
get the highest current value then add 1 and immediately save the table row
(otherwise someone else may grab the number before you save it).
I don't see how your prompts avoid duplication. Perhaps management never
heard of a 'unique index'.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".


"JTS" wrote:

> The business wish to have a unique identifier which is month, year, nnn where
> n starts at zero each month and is sequential as each quote comes in until
> the end of the month. Whereby the sequential numbers begin at zero again.
>
> For example the 43rd quote this month would have a reference number of
> 12/09/043
>
> To avoid duplication they wish Access to prompt with the new reference
> number when they access the new quote form.
>
> Can this be done?

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
generating unique identifiers Ibrahim Shameeque Microsoft Access VBA Modules 4 3rd Jan 2008 05:46 PM
Index/Unique Identifiers Random Microsoft Dot NET Framework 1 30th Sep 2004 08:29 PM
unique record identifiers GMAN Microsoft Excel Misc 1 29th Apr 2004 10:08 PM
How to get unique Record Identifiers working OK when linking Access to SQL Server Dave Microsoft Access External Data 1 18th Apr 2004 06:02 PM
Unique Identifiers Daniel O'Connell Microsoft Dot NET 0 20th Jan 2004 07:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:15 PM.