I have a table that holds a value (lastidtab)--one record. In my program I have a command button assign the next id number by getting the value in the lastidtab and adding 1. It then updates the the lastidtab with the incremented number. And so on.
The problem I am having is that the user will often have the Access database open more than once on her desktop and it appears that the lastidtab is not being updated properly, because at a later time, when the user needs to assign another id number and then tries to save the data to the table with that id number, she gets a message that says the changes you requested to the table were not successful because it would cause duplicate values in the primary key etc. The ID field is the primary key. The Access database is on our network.
Is there a way either make sure a user can not open the Access database twice or somehow deal with the table not being updated properly?
Thank you! [sig][/sig]
The problem I am having is that the user will often have the Access database open more than once on her desktop and it appears that the lastidtab is not being updated properly, because at a later time, when the user needs to assign another id number and then tries to save the data to the table with that id number, she gets a message that says the changes you requested to the table were not successful because it would cause duplicate values in the primary key etc. The ID field is the primary key. The Access database is on our network.
Is there a way either make sure a user can not open the Access database twice or somehow deal with the table not being updated properly?
Thank you! [sig][/sig]