Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ali Koumaiha
  Where is Ali Koumaiha?
 Farmington Hills
 Michigan - Lebanon
 Ali Koumaiha
 To: Leslie Sy
  Where is Leslie Sy?
 Makati
 Philippines
 Leslie Sy
 Tags
Subject: RE: Get the last id in MS access
Thread ID: 393661 Message ID: 393683 # Views: 50 # Ratings: 1
Version: Visual FoxPro 9 Category: Windows 7 and VFP
Date: Saturday, December 21, 2013 3:40:39 PM         
   


> Gud day everyone!
> In VFP9, I usually use record number to reference each row by
> using this code.
>
> select (lcTable)
> append blank
> nRecno = recno()
>
> By applying the same approach in MS Access,I added auto number in each table, the problem is? how can I get the ID after inserting record? please help me.
>
> thanks in advance.

don't have any Access experience,
but, maybe this (not tested)

select top 1 IID from MyTable order by IID DESC

Ez Logic

Ez Logic

ENTIRE THREAD

Get the last id in MS access Posted by JAVA 4ever @ 12/21/2013 6:39:54 AM
RE: Get the last id in MS access Posted by Ali Koumaiha @ 12/21/2013 3:40:39 PM
RE: Get the last id in MS access Posted by Vilhelm-Ion Praisach @ 12/22/2013 8:56:09 PM
RE: Get the last id in MS access Posted by David Mustakim @ 12/22/2013 9:05:13 PM
RE: Get the last id in MS access Posted by Glen Villar @ 12/23/2013 2:11:20 AM
RE: Get the last id in MS access Posted by Vilhelm-Ion Praisach @ 12/23/2013 5:46:22 AM
RE: Get the last id in MS access Posted by David Mustakim @ 12/23/2013 5:52:25 AM