Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Posts
    4

    Unanswered: Multi-users accessing same auto number..

    I am currently running Access 2000 on an NT OS. I have created a Access database for multi-users to input data (data entry) and have done this by splitting up the database into a front-end and back-end. I have three tables with the main table having an AutoNumber as the primary key. What I want is for a user to initialize a record, the AutoNumber gives "1" and once I start inputing data locks the number so that the next user that initiates (even if it is a second later) a record, the AutoNumber gives "2". What I have currently is the ability for two or more users to access the same auto number. Is there any way to do this? If so how?

    Thanks,

    Noki

  2. #2
    Join Date
    Dec 2003
    Location
    Toronto, Ont. Canada
    Posts
    238

    Re: Multi-users accessing same auto number..

    Originally posted by Noki
    I am currently running Access 2000 on an NT OS. I have created a Access database for multi-users to input data (data entry) and have done this by splitting up the database into a front-end and back-end. I have three tables with the main table having an AutoNumber as the primary key. What I want is for a user to initialize a record, the AutoNumber gives "1" and once I start inputing data locks the number so that the next user that initiates (even if it is a second later) a record, the AutoNumber gives "2". What I have currently is the ability for two or more users to access the same auto number. Is there any way to do this? If so how?

    Thanks,

    Noki
    Just curious Noki... Are you wanting to do this to save errors when the users try to save the unique records?... If so, I would suggest that you change the Autonumber field from incrementing to Random... It's almost impossible for conflicts to arise in this case... (I can't remember exactly what the chances are, but it's something like 1 in a billion...)

    Then you don't have to "initialize" the record at all...

    Maybe just use a date/time field to capture the time they start imputting the data and that would give you something to sort on later (newest records to oldest or vice versa) ...

    and when the user clicks Save (or adds the record) ... a random unique number and time will be assigned for that record...

    Does this help at all?

  3. #3
    Join Date
    Dec 2003
    Posts
    4
    Trudi,

    Thanks for the reply!

    Yes, I do not want users to be able to access the same AutoNumber, as they begin to input data. But the more I think about it the possiblity of two users starting and finishing at the same time seems to me very slim at best. However making the field ramdom would solve my problem also. I have been racking my brain all day and searching everywhere at Microsoft's Site trying to find a way to lock the AutoNumber once data was entered but came up empty. I think I was not asking the right questions in the "search". So I came on this site, decided to post, and you came back with a great reply that I did not even stop to concidered. So yes this did help and thanks again.

Posting Permissions

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