[AccessD] Assign Document Numbers

Wortz, Charles CWortz at tea.state.tx.us
Wed Jul 9 11:23:45 CDT 2003


Virginia,
 
Are you going to let these 20 or so users to randomly create these
prefixes or are you going to have combo boxes for them to select the
prefixes from?  If the later, then it should be easy to use the DMax()
function to find the last number assigned to that prefix and then add 1
to it.  If the former, you can do the same but you have to worry about
nulls if they are the first to create a given prefix.

Charles Wortz 
Software Development Division 
Texas Education Agency 
1701 N. Congress Ave 
Austin, TX 78701-1494 
512-463-9493 
CWortz at tea.state.tx.us 

-----Original Message-----
From: Hollis,Virginia [mailto:HollisVJ at pgdp.usec.com] 
Sent: Wednesday 2003 Jul 09 10:52
To: 'accessD at databaseadvisors.com'
Subject: [AccessD] Assign Document Numbers

 
 I've created a database for use by a group of individuals (perhaps 20
users) in which the user will open a form and place a request for a
document number. I need a document number to be automatically assigned
at that time.
 
An example of document numbers and their scheme are as follows: 
 
DC-2101-0001
DC-2204-0001
DC-2301-0001
LA-2605-0001
LA-2605-0002
LA-2605-0003
NR-2605-0001
 
It's the last set of numbers (0001, 0002, 0003) that I wish to have
assigned according to which first two sets (DC) and (2101) are input by
the user. Like if a user inputs "DC" and "2101"....I'd like the system
to automatically assign the next available number which would be "0002".
Therefore the document number assigned would be "DC-2101-0002".
 
Also, the bad thing for me is that we have already been using this
database (just one individual) and manually assigning these numbers. I
don't know how it would work out if we suddenly put the code in. Would
it acknowledge previous entries and assign the correct number?
 
If someone can help me with this, I'd be eternally grateful.
 
Virginia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030709/a82087c3/attachment-0001.html>


More information about the AccessD mailing list