473,385 Members | 1,944 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,385 software developers and data experts.

Autonumbering based on criteria

Hi,

Please forgive me if I use the wrong terminology, I will do the best I can. I am a self-taught Access uses and cueently creating a database for the firm I work for. Part of its function will be to generate logging numbers for incomming and outgoing correspondence. At the moment I have that happening as a simple autonumber that each piece of correspondence regardless of the project is related to gets logged in sequence. My question is this...

Is there a way to make the autonumbering count at different points for different projects? ie if project 05-114 might have had 500 piece of correspondence so we want the next log number to be 501 and project 04-127 might have had 200 pieces so we want the next number to be 201, but I want all the data held in one table for easy of queries etc.

If you can help of point me in the right direction I'd be most grateful.

Lee
Dec 15 '06 #1
3 2160
NeoPa
32,556 Expert Mod 16PB
AutoNumbering doesn't do that for you.
You will need to have some code inserted at the point of creation (appending) which uses DMax() to finds the highest number so far for the group that it's a member of.
This could be in addition to the AutoNumber field which can still be the Primary Key.
Dec 15 '06 #2
Thank you, I think I understand, will give it a go
Dec 15 '06 #3
NeoPa
32,556 Expert Mod 16PB
Thank you, I think I understand, will give it a go
Come back if you get stuck.
We do details too - but only where required ;).
Dec 15 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: netx | last post by:
I created table with "id" field as "uniqueidentifier" (primary key). I connect via ODBC from MS-Acces. -->>> Don't know how to something like "Autonumber" in MS-Access. Let me know If any...
8
by: Steven Stewart | last post by:
Hi there, I have a query (QueryB) that is based on the results of another query (QueryA). When I open QueryB itself, it displays the exact records that I want. I have a report based on...
2
by: neptune | last post by:
I have a query where each customer has an or . Sometimes both fields for a customer are populated, but if is null, then will be populated and vice versa. I have a form, , where I select a...
1
by: Peter D | last post by:
Private Sub Form_BeforeUpdate(Cancel As Integer) Dim X Dim Y Dim z X = Year(Date) Y = Nz(DMax("mycounter", "TABLENAME", "myyear=" & X), 0) + 1 Me!txtmycounter = Y Me!txtmyyear = X End Sub
4
by: James | last post by:
Dear group, Can anyone tell me how to do the following? I have a basic list of numbers in a table I want to be able to search these by letting the user type "<10" or ">=50" on a simple form...
2
by: N. Graves | last post by:
Hey is there a command like in SQL Transactional that will reset the Autonumber field to the highest number in the found in the field? I developing a access database with a several table that...
4
by: Andy Davis | last post by:
I have developed a number of reports that are based on parameter queries where the user enters criteria such as a date range and a sales rep say. I want to be able to show a graphical picture in...
5
by: SeanCly10 | last post by:
Hi all. I don't want to sound like a complete idiot here, but I'm somewhat limited in my coding knowledge, and I need some advice and help. I'm working on a database that will eventually be used...
1
by: FRENCH GUY | last post by:
Hi everyone, At the moment, I am working on a database with several tables. Almost every table has her own autonumbering field. So herefore, I am looking for the command that I have to include in...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.