If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
incrementing number based on criteria
I want my db to generate our reference # automatically based on input from
other fields. The number is the date record entered, the users initials, and an incremental number. Ex. 120505GMM02 My form is based on a query and I have the query generating the first two components from the date entered in reqdate and the initials entered. How can I get an incremental number generated to go with the rest. The number should start with 01 for each day and also for each user. Therefore when GMM is entering his third record on the 5th it should generate 120505GMM03 even if there were 10 other records entered on the fifth by other users. Each users numbers would start at 01 for each day. Thanks. Gary |
#2
|
|||
|
|||
incrementing number based on criteria
use a DCount() function to count the number of records already in the table
for that user on that day, and add 1. see the DCount() Function topic in Help to understand how it works, especially the criteria argument of the function. hth "Gary" wrote in message ... I want my db to generate our reference # automatically based on input from other fields. The number is the date record entered, the users initials, and an incremental number. Ex. 120505GMM02 My form is based on a query and I have the query generating the first two components from the date entered in reqdate and the initials entered. How can I get an incremental number generated to go with the rest. The number should start with 01 for each day and also for each user. Therefore when GMM is entering his third record on the 5th it should generate 120505GMM03 even if there were 10 other records entered on the fifth by other users. Each users numbers would start at 01 for each day. Thanks. Gary |
#3
|
|||
|
|||
incrementing number based on criteria
In addition to what Tina wrote, you should store your Ref# as 3 Fields, one
for the date of entry, one for the creator and one for the sequence number, NOT as one Field. -- HTH Van T. Dinh MVP (Access) "Gary" wrote in message ... I want my db to generate our reference # automatically based on input from other fields. The number is the date record entered, the users initials, and an incremental number. Ex. 120505GMM02 My form is based on a query and I have the query generating the first two components from the date entered in reqdate and the initials entered. How can I get an incremental number generated to go with the rest. The number should start with 01 for each day and also for each user. Therefore when GMM is entering his third record on the 5th it should generate 120505GMM03 even if there were 10 other records entered on the fifth by other users. Each users numbers would start at 01 for each day. Thanks. Gary |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sum number of cells based on letter/title criteria | chazmac | Worksheet Functions | 2 | November 28th, 2005 05:09 PM |
Concatenate fields based on criteria | Angel | Running & Setting Up Queries | 2 | November 10th, 2005 10:59 PM |
Returning Results Based on Two Criteria | [email protected] | Worksheet Functions | 7 | October 23rd, 2005 02:53 PM |
Can a query be written to search on a variable number of criteria. | bpoley | Running & Setting Up Queries | 0 | March 12th, 2005 12:41 AM |
Office 2003 installation problem, log file attached.... | Ryan | Setup, Installing & Configuration | 0 | January 20th, 2005 06:57 PM |