design issue follow-up (1 Viewer)

BadKitty

Registered User.
Local time
Today, 17:27
Joined
Jul 7, 2005
Messages
55
thanx for the advice...that does make more sense. my only other issue is adding the letter (m for meter permit, h for hydrant, etc.) to the permit # if they are all going to be in one table. btw, sorry for the duplicate postings...just under a bit of stress @ work. i'll make a note of it.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 16:27
Joined
Feb 28, 2001
Messages
27,317
If the numbers are to be consecutive (or just unique), you do best in my opinion to not put the permit letter in the same field with the permit number. Instead, have two fields that are separate in the DB but always displayed together on forms and reports.

Like

tblPermits
...
PmtNo, PK, possibly autonumber (if they don't have to be consecutive, just unique)
PmtCode, text, length 1, holds H or M or whatever other letter you use.
...

Any time you need to display these two items together, you can use something similar to...

[tblPermits]![PmtCode] & Format( [tblPermits]![PmtNo], "######" )

OR look up FORMAT function, User-defined numeric formats, to find how to put leading zeros in the format if that is what you wanted.
 

BadKitty

Registered User.
Local time
Today, 17:27
Joined
Jul 7, 2005
Messages
55
thanx!

thanx for your help...appreciate the quick response :)
 

Users who are viewing this thread

Top Bottom