Jump to content

This topic is 7156 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I have a database in which each record needs a unique name based on other values in that record. However, some fields may have the same value from record to record, so the "Name" field is calculated from a field "Namebase" & an appended unique serial number, which I obtained by using two self-join relationships in this table. If three records in the table share the same "Namebase", and a 4th is added that also has the same value for this field, then the serial number "4" is appended to "Namebase" to create the unique "Name".

The only problem with this is that if I later delete a record, some of the remaining names will change (the serial numbers of some records with the same "Namebase' will decrease by 1), and this is a major potential source of confusion for other applications. Is there any way for the name field in a given record to be locked or protected from further change if other records are changed later?

Marcel

Posted

Make your "Name" field an auto-enter calculation. That way, "Name" will be calculated the first time that data is available for "Namebase", but the auto-enter won't bother recalculating every time the number of related records changes. You can uncheck the "do not replace existing value of field" box if you want "Name" to update if you make changes to "Namebase", but this will lead to the same time of problem you're trying to avoid -- having the unique ID of a record change (albeit only because its Namebase changed, and not because of changes in other records).

-Terence

This topic is 7156 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.