473,396 Members | 1,777 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Autonumbers

I am using Access 2000.
I have a field called Job No.
There are already a bunch of records stored in this field. They begin with
the letter I.
ie. I2345 I2346 etc
I would like to now automate the numbering system where the data entry
person starts a new record and access give you the next job number
sequentially.

In the Data Type section of the table design... i have tried using the
Autonumber selection but it won't give me the flexibility to start
automating the numbering at a given number.
eg. Begin with job no. I2345 and from then it would start automating
the sequence from that number.
Any help would be appreciated.
Nov 13 '05 #1
1 1315
T23459 wrote:
I am using Access 2000.
I have a field called Job No.
There are already a bunch of records stored in this field. They begin
with the letter I.
ie. I2345 I2346 etc
I would like to now automate the numbering system where the data entry
person starts a new record and access give you the next job number
sequentially.

In the Data Type section of the table design... i have tried using the
Autonumber selection but it won't give me the flexibility to start
automating the numbering at a given number.
eg. Begin with job no. I2345 and from then it would start
automating the sequence from that number.
Any help would be appreciated.


First off if the first (and only) alpha character is always "I" then it doesn't
need to be stored at all. You can display a leading "I" with formatting. This
would allow you to change the column to an actual number field which then
greatly simplifies the next step.

Given a number column you can use an event in the data entry form to
automatically determine the next number by finding the highest existing value
and adding 1 to it. In multi-user situations BeforeUpdate is the event best
suited to this task because the record is saved almost instantly after the new
number is calculated.

If Nz(Me![Job No], 0) = 0 Then
Me![Job No] = Nz(DMax("Job No", "TableName"), 0) + 1
End If

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jim Andersen | last post by:
Hi there, After compacting/repairing a db, I was getting duplicate autonumbers. According to MS KB article http://support.microsoft.com/default.aspx?kbid=257408 This should be fixed with a...
1
by: Aravind | last post by:
Hi folks. I have 2 tables, AccList and Book. Book has ISBN as its primary key, while AccList has AccNo as its primary key (data type = Autonumber) and ISBN as its foreign key. The entries...
2
by: Megan | last post by:
Hi everybody- I have 2 tables, Hearings and Rulings. Both have primary keys called, CaseID, that are autonumbers. I don't want both tables to have the same autonumber. For example, if Hearings...
0
by: Zen | last post by:
Can I use "autonumbers" with this configuration? Access XP + Jet 4.0 SP8 1) In some circumstances Autonumber fields cannot correctly reseeded? 2) Or they are properly stable (like Jet 3.5...
1
by: Karen Hill | last post by:
I have a two value table where the first field is an autonumber. I wrote an SQL statement in visual basic for applications to insert but it fails. This is the code: DoCmd.RunSQL "INSERT INTO...
1
by: Gt394 | last post by:
I have an autonumber field that provides sequential Quote numbers for each entry in a form. If an entry begins but then the user wants to cancel the entry, the Cancel button simply clears all...
2
by: MS Access confuses me 2 | last post by:
Hi Gurus, Please accept my niave understanding of Access, as i am haplessly lost and don't understand as to why the automation of autonumbers is trying to create new numbers even though i have...
1
by: Julie Smith | last post by:
Hi, I have a question about autonumbers in Access db. How are they assigned when adding a new row to a table? I have table that has an autonumber column (replication ID/System.Guid) and a name...
6
by: Salad | last post by:
I'm going to implement an archival database for my app. I have Table1 and Table2. Table2 is a duplicate structure of Table1. I appended records with "ID between 1 and 100", then "ID between 300...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.