Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Group ID

Author  Topic 

weedavie22
Starting Member

24 Posts

Posted - 2004-02-04 : 05:45:53
Hi guys I was wondering if anyone knows the answer to this,

Within my database I have a field known as clientcode which is something like this 0001GLA, 0002GLA, 0003GLA......

What I would like to do is have a field called propID in my database that counts the individual clientcodes e.g.
Three records could have clientcode 0001GLA so the PROPID would be 0001,0002,0003 consecutively giving me the ability to have a unique reference for each record 0001gla/0001, 0001gla/0002...
The problem is, there could also be two records for clientcode 0002GLA which would require there own set of PROPIDs e.g.
0002GLA/0001, 0002GLA/0002.

Any ideas,

Ps. I hope this is clear, as it’s quite difficult to explain ;)




X002548
Not Just a Number

15586 Posts

Posted - 2004-02-04 : 15:47:37
Well how would you know which row to assign which numeric value too?

You could use vb code, open a record set and use break logic to increment and reset the "counter" and then write the rs back out, or perform an update to it.



Brett

8-)
Go to Top of Page
   

- Advertisement -