Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005
    Location
    Lancaster PA, USA
    Posts
    33

    Unanswered: record locking, save command

    This is probably something very simple that i'm overlooking.... I have a form that is used to enter new jobs, there is a jobID field that is an autonumber and there are 4 required fields. The problem is that this form takes a bit of time for the user to fill out and so it is possible for another user to generate the same jobID and so the first one to finish entering the record gets to save theirs and the other user has to start over. I thought I could minimize this by have the record save after the fourth required field instead of after the entire form is completed. I used DoCmd.Save this saves the records but closes the form each time. I know there is an acSave function but i'm not sure how to use it. Any help would be appreciated.

  2. #2
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    Use the following command:

    DoCmd.RunCommand acCmdSaveRecord

    It is the same command that is run if the user went to Records/Save Record.

    But the problem you are describing should never happen. Once the user starts entering data into a record with an Autonumber field, the value of that field is defined. I have never had a problem like you are describing. Usually people complain that Autonumbers are wasted when a user begins adding a record and exits without saving the record.

  3. #3
    Join Date
    Dec 2005
    Location
    Lancaster PA, USA
    Posts
    33
    thanks i'll give this a try. I've been looking for this command high and low and the help features are no help at all. The reason we're having this problem is because there are four required fields on the form and the record cannot be saved until they are filled in. Its during the time one user is filling these out that another can generate the same autonumber.

Posting Permissions

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