Hello all,
I'm not sure if this should be posted in the VBA section, but I'll start off here.
I've got the following parts in my DB:
- Master table with all possible reason codes
- Table with shipment number / reason code / comment
- Form to enter new data in to the second table
However, what I am aiming for is the following
- A shipment number can occur multiple times, if the first two digits of the reason code is not identical. For example:
1234567 | LD****
1234567 | LC****
1234567 | CM****
should be allowed, however:
1234567 | LDCF**
1234567 | LDFM**
1234567 | CM****
should not be allowed. Background to this is that each stage of a shipment (indicated by the first two digits) can only have one reason code connected to it.
Most optimal solution would be a message box when a duplicate is entered, which notifies the user that a reason code is being entered which already exists, and if the existing record should be overwritten yes/no
"yes" would lead to a deletion of the existing record and saving the new entry, "no" would cancel the entry.
I'm not sure if this should be posted in the VBA section, but I'll start off here.
I've got the following parts in my DB:
- Master table with all possible reason codes
- Table with shipment number / reason code / comment
- Form to enter new data in to the second table
However, what I am aiming for is the following
- A shipment number can occur multiple times, if the first two digits of the reason code is not identical. For example:
1234567 | LD****
1234567 | LC****
1234567 | CM****
should be allowed, however:
1234567 | LDCF**
1234567 | LDFM**
1234567 | CM****
should not be allowed. Background to this is that each stage of a shipment (indicated by the first two digits) can only have one reason code connected to it.
Most optimal solution would be a message box when a duplicate is entered, which notifies the user that a reason code is being entered which already exists, and if the existing record should be overwritten yes/no
"yes" would lead to a deletion of the existing record and saving the new entry, "no" would cancel the entry.
Last edited: