Microsoft Access Forums

Go Back   Microsoft Access Forums > Access Forums > Access

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 07-21-2006, 03:31 AM
wasim_sono wasim_sono is offline Windows XP Access 2007 (version 12.0)
Advanced Beginner
 
Join Date: May 2005
Location: Pakistan
Posts: 68
wasim_sono
Default Customizing the Autonumber field

Dear All

I have a table with an autonumber field. This field generates auto numbering like 1,2,3,4,5.... etc.

I wish to customize this result like B-001, B-002, B-003....etc.

Is it possible ? If yes then how? Please help me.

Thanks.
Reply With Quote
  #2  
Old 09-01-2006, 05:27 AM
Novice
 
Join Date: Sep 2006
Location: Manchester, England
Posts: 13
DanInManchester
Default

The only way to do this is to use a manual primary key which I nearly always try and avoid.

For your example you would use a text field of length 5 and set it as the primary key.

You'd then need to write some validation to validate the input of the key and some code to generate the key.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with autonumber field in a form admaldo Forms 0 02-25-2008 08:09 AM
AUTONUMBER J A F F A Database Design 1 10-03-2007 08:30 AM
Quick way to stuff field names into text field kfinpgh Programming 0 01-04-2007 10:13 AM
duplicate autonumber rayc Access 0 01-16-2006 06:57 AM
do all primary keys use autonumber k Database Design 4 11-22-2005 06:32 AM


All times are GMT -8. The time now is 02:42 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.