Access - Identity Key


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Access - Identity Key

  1. #1
    Aaron Coombs Guest

    Access - Identity Key

    Hello,

    Is it possible to retrieve the Primary Key(Autonumber) for a new record
    after insertion? How can I pass values to an append query stored in the
    access database and get the primary key id in return?

    Thanks,

    Aaron



  2. #2
    Venu Guest

    Re: Access - Identity Key


    Dear Aaron:
    If I understood your question correctly,

    add this code
    adodc1.recordset.requery
    This should bring up primary key(autonumber) on to the form.
    You should also need to add additional code for making sure
    adodc1.recordset.movelast
    This will move the recordset and user can see the Primary key.
    I hope this is helpful.
    Let me know.
    Venu

    "Aaron Coombs" <a.coombs@home.com> wrote:
    >Hello,
    >
    >Is it possible to retrieve the Primary Key(Autonumber) for a new record
    >after insertion? How can I pass values to an append query stored in the
    >access database and get the primary key id in return?
    >
    >Thanks,
    >
    >Aaron
    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center