Help - updating fields

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

Guest

I need to update a field in a table based on what another field is

Table Now
-------------

Now_month Count
1
1
1
1
1
2
2

What I need to do is insert incremental values in the count field based on
what the now_month field value is. When the now_month field changes the
counter needs to reset and then start counting again + inserting that value
into the table.

Table after
------------

Now_month Count
1 1
1 2
1 3
1 4
1 5
2 1
2 2

What is the best way of doing this ?

Any help much appreciated !!!!!
 
Dogz,

I can't see any way of achieving this, without a lot of fiddling.

Is this a table that records are being added to as time goes on? If so,
one thing to consider would be to enter your serial numbers manually for
the existing data, and then automate the entry in the Count field for
new records... this can be done using the Default Value property, or
using the Before Insert event of the form.

If you want to enter the Count values for existing records using an
Update Query, you will first need another field in there to uniquely
identify each record, such as an Autonumber field, or a DateCreated
field, or some such. But then, if you think about it, your Count field
would then be pointless anyway.

By the way, as an aside, the word Count is a Reserved Word (i.e. has a
special meaning) in Access, ands as such should not be used as the name
of a field.
 
Back
Top