Update Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I was given great help recently regarding updating of a field with a static
number. I was wondering ... if I needed to populate a field in a table with
an incrementing number - is this possible?

Example 1: Name Dept Code
Ann 10256
Michael 10256
Jane 10256

This works fine with an update query. What I am looking for now is:

Example 2: Name Dept Code
Ann 10256
Michael 10257
Jane 10258
 
What does the original data look like? Is there a unique counter or ID? If
you start with what you have in Example 1, you can get to the data in Example
2 by duplicating the table structure, changing [Dept Code] to an AutoNumber,
seeding the AutoNumber with the first [Dept Code]-1 via an update query, and
appending the data from Example 1. You can also cycle through the records
with VB and update the fields that way. HTH
 
hi,

It is possible. For example, if you have a new table, or want to add a
column to an existing table, you can check the properties for that column.
Make sure the column data type is number, and that the New Values property is
set to "Increment" instead of "Random". There are also many other ways to
add an incrementing number through a form, but this one is probably the most
straightforward approach. Let me know if you need more help.

geebee
 
Hi was wondering where I find the "New Values" property in order to set it to
Increment??

Many thanks
 
New Values is a property of an AutoNumber field and is only available in the
design view of a table.
The New values property only applies to Autonumber fields.
 
Hi

Thanks for that but I cannot get it to work??

This is what I have

Code Number 1 Number 2
A11 1
A13 2
A14 3
A15 4
A16 5
A20 7
A25 8

Field "Number 2" is blank at the moment.
I would like a query to fill in this Number 2 field with numbers starting at
example: 1000 and filling down to 1004 etc..

Many thanks
 
Back
Top