[AccessD] Numbering Different Criteria

Wortz, Charles CWortz at tea.state.tx.us
Thu May 15 07:48:10 CDT 2003


Virginia,
 
Make life easier for yourself and keep each of these items individual
fields.  The arithmetic is easier done on strictly numeric fields.  You
can concatenate them together when you need to display them.
 
I have a customer I could kill because they came to me AFTER printing a
million new forms and asking me to adjust the database to accept the new
serial numbers on the forms.  Of course the new serial numbers do not
fall into either proper numeric or alphabetic sorting sequence with the
old serial numbers.  So I am having to do some of the same things you
are wanting to do.
 

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: Thursday 2003 May 15 07:33
To: 'accessd at databaseadvisors.com'
Subject: [AccessD] Numbering Different Criteria


I need to set up a way to assign sequential numbers based on different
criteria.
 
The first part of the number is a document number, it can be either
AB1234 or CD6789, the next part is for the Engineering section (C for
Civil, M-Mechanical, E-Electrical). So the numbering scheme would be:
 
AB1234-C001 (tracking number - section, sequential number)
AB1234-C002
AB1234-M001
CD6789-E001
CD6789-E002
CD6789-M001
 
The numbers also contain revisions and change letters. If I want the
next Civil number for document tracking number AB1234, it would be:
 
AB1234-C003, Rev 0, Ch 0 (document number - section, sequential number,
revision, change)
then AB1234-C003, Rev 0, Ch A
or AB1234-C003, Rev 1, Ch 0
AB1234-C003, Rev 1, Ch A
 
I thought if I could have the form select the tracking number & the
section, I could use a query to designate what the next sequential
number would be based on the tracking number & the section. Then I
couldn't get the two different criteria to work together. 
 
   ' Find the record that matches the control.
    Me.RecordsetClone.FindFirst "[DocID] = '" & Me![cboDocNum] & " AND
[Section] = " & Me![cboDocNum] & "'"
 
Now I got to wondering how I would handle the Revision & Change Letter.
Any ideas how I can put all this together?
 
Virginia

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030515/944ef6d7/attachment-0001.html>


More information about the AccessD mailing list