I have an issue with an old database I inherited. I have updated to Access 2007 front-end and moved the back-end to SQL.
The field in question is called “Number” with field type of Int. This field is populated from the form based on the following calc:
=DMax("[Number]","[RequiredReportTable]","[ContractNumber] =" & [Forms]![AddRequiredReportForm]![ContractNumber])+1
The table – RequiredReportTable – has a number of different Contract numbers. Each time a record is added for a specific contract nr – the “Number” field should increase by 1 – only for that contract nr. This works most of the time – but sometimes it skips numbers – which means it appears as though records may have been deleted.
I can’t figure out why it is skipping numbers. Can anyone help? Is there a better way to do this?
The field in question is called “Number” with field type of Int. This field is populated from the form based on the following calc:
=DMax("[Number]","[RequiredReportTable]","[ContractNumber] =" & [Forms]![AddRequiredReportForm]![ContractNumber])+1
The table – RequiredReportTable – has a number of different Contract numbers. Each time a record is added for a specific contract nr – the “Number” field should increase by 1 – only for that contract nr. This works most of the time – but sometimes it skips numbers – which means it appears as though records may have been deleted.
I can’t figure out why it is skipping numbers. Can anyone help? Is there a better way to do this?