gold007eye
Registered User.
- Local time
- Today, 18:03
- Joined
- May 11, 2005
- Messages
- 260
Is it possible to reset the DMax function on a particular field (Extension) for each new record. I have been racking my brain all day trying to get this to work to no avail.
I know it is possible to have a numbering sequence reset each new year, but I need it to reset on each new record that is created; more specifically by each new SSN.
Example (Initial Record):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 0000001
Example (Next Record Same SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 000000101
Example (Next Record Same SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 000000102
======================================
Example (New Record Different SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 0000002
Example (Next Record Different SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 000000201
Example (Next Record Different SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 000000202
======================================
The problem I am having is getting the extension to start back at 01 right now when I use DMax and create a new record with a different SSN it comes out like this:
Example (New Record Different SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 0000003
Example (Next Record Different SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 000000303
Example (Next Record Different SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 000000304
Please help as I am pulling my hair out trying to get this to work and this is the 1 piece of code holding me back from making progress
I have attached a picture to give you an idea of what I am talking about.
I know it is possible to have a numbering sequence reset each new year, but I need it to reset on each new record that is created; more specifically by each new SSN.
Example (Initial Record):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 0000001
Example (Next Record Same SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 000000101
Example (Next Record Same SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 000000102
======================================
Example (New Record Different SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 0000002
Example (Next Record Different SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 000000201
Example (Next Record Different SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 000000202
======================================
The problem I am having is getting the extension to start back at 01 right now when I use DMax and create a new record with a different SSN it comes out like this:
Example (New Record Different SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 0000003
Example (Next Record Different SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 000000303
Example (Next Record Different SSN):
SSN: 123-45-6789
Provider Number = BaseID & Extension: 000000304
Please help as I am pulling my hair out trying to get this to work and this is the 1 piece of code holding me back from making progress
I have attached a picture to give you an idea of what I am talking about.