Results 1 to 1 of 1
  1. #1
    Join Date
    Jun 2002
    Posts
    2

    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:
    10, blue
    10, green

    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.

    Question:
    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???

    I appreciate any insightful comments.

    Thanks in advance.
    Last edited by PhazeZer0; 03-31-03 at 23:26.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •