custom data type

BadKitty

Registered User.
Local time
Yesterday, 22:35
Joined
Jul 7, 2005
Messages
55
i am creating a database that will include four (4) tables that need to have an autonumber as a primary key, but i need that autonumber to be preceded by a letter (one letter for each table). i am creating forms for the users to based on these tables for users to enter data. please help...i'm running short on time. thanx!

the database i'm creating will be used to store city issued permits. there a 4 different types of permits that can be issued, some w/the same info (i.e. contractor, owner) and others with different data (certain permits are only issued for a specific # of days, others require a tap or meter size, etc.). i have separate tables for the contractors, owenrs, and payments, but each payment needs to be associated with a particular permit #. for example: check #3 from john doe contracting is associated with permit # m123, or h123, etc. that's why i decided to have a separate table for each permit type. i was attempting to avoid data redundancy. i also need separate forms for the users to enter data into as per their request. i'm open to suggestion if you have some other ideas. thanx in advance. :confused:
 
Last edited:
You can make it appear to have a letter by formating the Autonumber with something like \a&

It will still be a number and Access works faster with numbers than text fields.

If you really want a letter there then add it to another field as the default value and join them together in a query, but it is not good design. Autonumbers are best kept hidden from the user and should not be used if you need a strict numerical sequence as they can easily skip numbers

HTH

Peter
 
Why are you separating data into 4 tables? What is the meaning of the letter? Sounds like you are starting off with a design issue. Best to nip it in the bud.
 
BadKitty said:
i am creating a database that will include four (4) tables that need to have an autonumber as a primary key, but i need that autonumber to be preceded by a letter (one letter for each table). i am creating forms for the users to based on these tables for users to enter data. please help...i'm running short on time. thanx!

You might want to look at the thread here: http://www.access-programmers.co.uk/forums/showthread.php?t=89864. This has a discussion about the issues of what a primary key should and shouldn't be.

I also agree with Pat's point that you may have some design issues. There may be no reason to have multiple tables.
 

Users who are viewing this thread

Back
Top Bottom