Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Job Number with prefix

Status
Not open for further replies.

richvalve

Programmer
Mar 2, 2001
20
GB
Hello

I've designed a database for the job numbers at my company. However instead of just the normal 'autocount' ie 1, 2, 3 for the jobs. I would idealy like a prefix of 02/001, 02/ 002... etc. As 02 = year 2002.

I would of thought this was pretty simple, but it does not appear so!

If anyone has any advice, it would be greatfuly recieved!

Many Thanks
 
Well... I am not a big fan of concatonated intelligent key fields. I used them in the past with some success, but in my opinion; the better data design is to use a seperate field for Job No. and Year. You can always concatonate them on a data entry screen or report. How the data is stored on the backend is irrelevent of how it is displayed to users.

Private Sub Command2_Click()
Dim lc_Text As String
lc_Text = Year(Date) & "0001"
MsgBox (lc_Text)
End Sub

Seems to work Ok... htwh Steve Medvid
"IT Consultant & Web Master"
 
Hey, Steve:
I agree with you about concatenated id's. I have a table of owners, one of properties, and one of tenants. I can display any combination I want, e.g.:
Code:
3220(property)+703(Owner)+003(the 3rd tenant)

so that it looks like:
Code:
3220703003, or 3220 703 003, or 3220/703/003 or

3220
703
003

Works for me.

Gus Brunston :cool: An old PICKer, using Access2000
padregus@attbi.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top