Hi there - I'm trying to sort out some code to count the occurances of some data in a field.
Basically I have an ID field that has been created from an update query. The result is a couple of thousand names like:
Smith-John
Bloggs-Joe
etc...
What I need is some code to go through each record and at each point in the table I need to know how many occurances of that entry there are.
So for example if at record number 1000 in the table there are 5 occurances of Smith-John I need to update a field called 'Name Count' with the number of occurances and so on.
The count has to reflect the number of occurances at each record in the table as I'm using this information to create another ID field I'm using for something else.
Hope this makes sense.
Thanks very much for your help in advance.
Basically I have an ID field that has been created from an update query. The result is a couple of thousand names like:
Smith-John
Bloggs-Joe
etc...
What I need is some code to go through each record and at each point in the table I need to know how many occurances of that entry there are.
So for example if at record number 1000 in the table there are 5 occurances of Smith-John I need to update a field called 'Name Count' with the number of occurances and so on.
The count has to reflect the number of occurances at each record in the table as I'm using this information to create another ID field I'm using for something else.
Hope this makes sense.
Thanks very much for your help in advance.