Multipart Record Number

B

Bryan

I have a DB where they need the record number to consist of three parts. The
first is a constant number, "43." The second part is derived from a reason
code in a table which is selected from a ComboBox. (Table contains two
columns; the 2 digit code, 01 thru 09, and the text reason.) The third part
is an auto number. I'll end up with: 43-XX-XXXXX. How do I go about
getting all this to work in my record number field? Thanks in advance!
 
R

rowiga

Where is the autonumber portion of the record number coming from? Do the
record numbers have to be unique? Do the records have to increment based on
previously used records numbers?

As an example...if you have 43-01-00001 can the next record number be
43-09-00002 and the next record number be 43-01-00003?
 
M

Mike Painter

Bryan said:
I have a DB where they need the record number to consist of three
parts. The first is a constant number, "43." The second part is
derived from a reason code in a table which is selected from a
ComboBox. (Table contains two columns; the 2 digit code, 01 thru
09, and the text reason.) The third part is an auto number. I'll
end up with: 43-XX-XXXXX. How do I go about getting all this to
work in my record number field? Thanks in advance!

Use a query and leave the individual fields as they are.
The query will have a calculated field named WhatEver
WhatEver: "43-"& comboboxresult & "-" & YourAutonumber
Index all three fields and if your auto number is a real autonumber use it
as the key.
 
B

Bryan

Record number
yes
yes
yes

rowiga said:
Where is the autonumber portion of the record number coming from? Do the
record numbers have to be unique? Do the records have to increment based on
previously used records numbers?

As an example...if you have 43-01-00001 can the next record number be
43-09-00002 and the next record number be 43-01-00003?
 
Top