Unanswered: FormEvents and concurrent users Access 2000
My question is about possible problems with form events modifying a database with concurrent users.
I have a Table A that has an Autonumber primary key. Table B is created by one of A's multivalued attributes.
e.g. A has a record with primay key =10 and B could have records like:
To insert into B I have to
1) insert into A first,
2) get the primary key of A that I just inserted
3) insert into B for each selected item in multivalued combo box
I use the Form_AfterInsert Event to do #2, but I do a Max(PriKey) to get the last inserted key -- Ideally I would have used triggers or @@Identity var in MS SqlServer /Sybase , but I dont have those in Access.
If I have 2 (or more) users and User1 inserts into A and User2 inserts into A immediately after, is it possible that User1 Form_AfterInsert event will get User2's last inserted primary key of A ??
Does Access mix events or does Access queue them up by connection such that User1 AfterInsert event be called before User2 can insert into Table A???