Need to add new number

  • Thread starter Thread starter Brent
  • Start date Start date
B

Brent

I have a database that I keep track of task for my staff in. I put the task
into the database then review who it should go to. the issues I have is
that I want to assign it an individual sequential task number but I don't
want to do this until after I have reviewed call loads and other items.
Does anyone have some code that increments the maximum number is a table by
1? thanks

Brent
 
Worked Great......thanks

The only issue I have is that if it is the first record in the database it
leaves it blank and then makes the second record 1. Not a huge deal if
you haven't heard of this before....



Thanks
Brent
Graham Mandeno said:
Hi Brent

Here is one way:
Nz(DMax("Fieldname", "TableName"),0) + 1

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Brent said:
I have a database that I keep track of task for my staff in. I put the
task into the database then review who it should go to. the issues I
have is that I want to assign it an individual sequential task number but
I don't want to do this until after I have reviewed call loads and other
items. Does anyone have some code that increments the maximum number is a
table by 1? thanks

Brent
 
OK new problem on this....I am reviewing these records in a form that has
the individual records in the subfrom (continuous form) and when I use this
code it only updates the first record in the subset. I tried to use an
update query to write directly into the table but it gave every record the
Last Record +1 (Assigned 3335 for every record in the table that meet the
query qualifications). Is there a better way to run an update query that
will run this function on each record and give the sequential numbers I'm
looking for? Any help is appreciated.

Brent


Graham Mandeno said:
Hi Brent

Here is one way:
Nz(DMax("Fieldname", "TableName"),0) + 1

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Brent said:
I have a database that I keep track of task for my staff in. I put the
task into the database then review who it should go to. the issues I
have is that I want to assign it an individual sequential task number but
I don't want to do this until after I have reviewed call loads and other
items. Does anyone have some code that increments the maximum number is a
table by 1? thanks

Brent
 
Back
Top