Results 1 to 5 of 5
  1. #1
    ann06 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Posts
    6

    Question Bound field with autonumber ID, how to create new record ?

    Hi,
    I have a a bound form with autonumber ID, I added a a "New" button to the form with the script ( DoCmd.GoToRecord acForm, "form1", acNewRec)
    if pressed the new button the ID field shows "New" until the form is dirty it will generate the record ID and a record will be created.


    How to make the form generate the ID without typing or selecting values. i.e, when the user press the new button a record ID will be generated and a record is created ?

    Thank you very much

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Access does not generate a Unique ID until you start entering data.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Why would you need to commit the record without any data?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    The only way I know is to populate a text field in that current record with an empty string and then save.

  5. #5
    ann06 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Posts
    6
    great thank you.. guys

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 11-21-2013, 05:06 PM
  2. How to Create a Autonumber with dashes
    By sylviar in forum Access
    Replies: 5
    Last Post: 05-09-2013, 09:08 AM
  3. Replies: 0
    Last Post: 09-17-2012, 03:35 PM
  4. Replies: 30
    Last Post: 01-16-2012, 05:49 PM
  5. Create one record for every field in another table
    By sailngsue in forum Programming
    Replies: 6
    Last Post: 09-27-2011, 03:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums