Rude Awakening
New Member
- Joined
- Jul 10, 2014
- Messages
- 36
- Office Version
- 365
Hey All
Its easy to do this in Excel but Access apart from the general stuff to me is difficult.
Basically I need to create Unique ID's for requirements. Each requirement has a program and the requirements are based on the program.
There is a field(record) in the table for Program, so What I need is for Access to grab the first three letters of the program name, add a three character integer after the grabbed letters, and increment the number each time the three letters are the same and then to re-indent from 000 when the letters change i.e.
Google(Goo), Yahoo(Yah), MSN(MSN)
I don't mind if I need to have a column with the three characters pulled, but would prefer not to.
Cheers folks
[TABLE="class: outer_border, width: 500, align: left"]
<tbody>[TR]
[TD]Google
[/TD]
[TD]GOO
[/TD]
[TD]GOO - 001
[/TD]
[/TR]
[TR]
[TD]Google
[/TD]
[TD]GOO
[/TD]
[TD]GOO - 002
[/TD]
[/TR]
[TR]
[TD]MSN
[/TD]
[TD]MSN
[/TD]
[TD]MSN - 001
[/TD]
[/TR]
[TR]
[TD]Yahoo
[/TD]
[TD]YAH
[/TD]
[TD]YAH - 001
[/TD]
[/TR]
[TR]
[TD]Google
[/TD]
[TD]GOO
[/TD]
[TD]GOO - 003
[/TD]
[/TR]
[TR]
[TD]MSN
[/TD]
[TD]MSN
[/TD]
[TD]MSN - 002
[/TD]
[/TR]
[TR]
[TD]MSN
[/TD]
[TD]MSN
[/TD]
[TD]MSN - 003
[/TD]
[/TR]
[TR]
[TD]Yahoo
[/TD]
[TD]YAH
[/TD]
[TD]YAH - 002
[/TD]
[/TR]
[TR]
[TD]Yahoo
[/TD]
[TD]YAH
[/TD]
[TD]YAH - 003
[/TD]
[/TR]
[TR]
[TD]Yahoo
[/TD]
[TD]YAH
[/TD]
[TD]YAH - 004
[/TD]
[/TR]
[TR]
[TD]Google
[/TD]
[TD]GOO
[/TD]
[TD]GOO - 004
[/TD]
[/TR]
[TR]
[TD]MSN
[/TD]
[TD]MSN
[/TD]
[TD]MSN - 004
[/TD]
[/TR]
[TR]
[TD]MSN
[/TD]
[TD]MSN
[/TD]
[TD]MSN - 005
[/TD]
[/TR]
[TR]
[TD]Google
[/TD]
[TD]GOO
[/TD]
[TD]GOO - 005
[/TD]
[/TR]
[TR]
[TD]MSN[/TD]
[TD]MSN
[/TD]
[TD]MSN - 006
[/TD]
[/TR]
[TR]
[TD]MSN
[/TD]
[TD]MSN
[/TD]
[TD]MSN - 007
[/TD]
[/TR]
[TR]
[TD]Yahoo
[/TD]
[TD]YAH
[/TD]
[TD]YAH - 005
[/TD]
[/TR]
[TR]
[TD]Google
[/TD]
[TD]GOO
[/TD]
[TD]GOO - 006
[/TD]
[/TR]
[TR]
[TD]Yahoo
[/TD]
[TD]YAH
[/TD]
[TD]YAH - 006
[/TD]
[/TR]
[TR]
[TD]Yahoo
[/TD]
[TD]YAH
[/TD]
[TD]YAH - 007
[/TD]
[/TR]
</tbody>[/TABLE]
Its easy to do this in Excel but Access apart from the general stuff to me is difficult.
Basically I need to create Unique ID's for requirements. Each requirement has a program and the requirements are based on the program.
There is a field(record) in the table for Program, so What I need is for Access to grab the first three letters of the program name, add a three character integer after the grabbed letters, and increment the number each time the three letters are the same and then to re-indent from 000 when the letters change i.e.
Google(Goo), Yahoo(Yah), MSN(MSN)
I don't mind if I need to have a column with the three characters pulled, but would prefer not to.
Cheers folks
[TABLE="class: outer_border, width: 500, align: left"]
<tbody>[TR]
[TD]Google
[/TD]
[TD]GOO
[/TD]
[TD]GOO - 001
[/TD]
[/TR]
[TR]
[TD]Google
[/TD]
[TD]GOO
[/TD]
[TD]GOO - 002
[/TD]
[/TR]
[TR]
[TD]MSN
[/TD]
[TD]MSN
[/TD]
[TD]MSN - 001
[/TD]
[/TR]
[TR]
[TD]Yahoo
[/TD]
[TD]YAH
[/TD]
[TD]YAH - 001
[/TD]
[/TR]
[TR]
[TD]Google
[/TD]
[TD]GOO
[/TD]
[TD]GOO - 003
[/TD]
[/TR]
[TR]
[TD]MSN
[/TD]
[TD]MSN
[/TD]
[TD]MSN - 002
[/TD]
[/TR]
[TR]
[TD]MSN
[/TD]
[TD]MSN
[/TD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