We can't really answer this exactly, only give you some general ideas to play with.
There are a huge number of reasons why this might be happening - you really need to look more closely using the debugger, and also try to replicate the condition under which the program is running. For example, is the database being used as single user, or multiuser?
However, one thing to look at is that if you are using the last number in the database to indicate what the next mnumber will be, you need to specify the sort order on tehrecords when you retirve them - otherwise there is no guarantee that they are returned in the order you want:
SELECT (investigation ) As Investigations FROM investigation
Can return records in any order Access feels like, which may not be the one you expect.
SELECT (investigation ) As Investigations FROM investigation ORDER BY investigation ASC
Fixes that.