|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
MS Access equivalent to IDENT_CURRENTI am using an ODBC Access database along with Visual Basic. I have created a
Header/Detail screen.... My question is: After creating the Header Record, I need to retrieve the Record ID (rec_id is auto-number) from this Header. With SQL I just use IDENT_CURRENT. Is there an Access equivalent to IDENT_CURRENT? "Bob" <B**@discussions.microsoft.com> wrote in message Use can use the LastUpdated (wait, I think it's LastModified) property of news:D61DBC6E-CF32-45CA-9712-D1D7BDA7C3CF@microsoft.com... >I am using an ODBC Access database along with Visual Basic. I have created >a > Header/Detail screen.... My question is: After creating the Header > Record, > I need to retrieve the Record ID (rec_id is auto-number) from this Header. > With SQL I just use IDENT_CURRENT. Is there an Access equivalent to > IDENT_CURRENT? the DAO Recordset to set the Bookmark of the recordset to the row you just added, and then you can retrieve your new AutoNumber value. On Thu, 13 Oct 2005 13:03:02 -0700, Bob <B**@discussions.microsoft.com> wrote:
¤ I am using an ODBC Access database along with Visual Basic. I have created a ¤ Header/Detail screen.... My question is: After creating the Header Record, ¤ I need to retrieve the Record ID (rec_id is auto-number) from this Header. ¤ With SQL I just use IDENT_CURRENT. Is there an Access equivalent to ¤ IDENT_CURRENT? If I remember correctly, the autonumber value is available after calling the Recordset AddNew method. For ADO you need to use a server-side cursor (which is the default). Paul ~~~~ Microsoft MVP (Visual Basic)
Difference in SQL Syntax between Access and MySQL (from VB6 project using ADO)
Using shellexecute...... Ping Ken Halter VBA and ADODB.Recordset question Amber Alert Ticker on VB6 Form Help - Single-Select with Listbox... Problem offering font selection with listview in regions other than US user-defined type not defined Determine when report printed to specific printer Resizing text boxes |
|||||||||||||||||||||||