PC Review


Reply
 
 
ABC
Guest
Posts: n/a
 
      2nd Feb 2004
Hi,
I am using Access 2000 as backend and VFP 5 as frontend.

Using SQLEXEC function to insert a row in access table.
This table has an AUTONUMBER field set to 'Increment'.

Now how to determine the value of this field for the newly
addedd record ?
Regards



 
Reply With Quote
 
 
 
 
Tim Ferguson
Guest
Posts: n/a
 
      2nd Feb 2004
"ABC" <(E-Mail Removed)> wrote in
news:86d601c3e95e$7d1176c0$(E-Mail Removed):

> This table has an AUTONUMBER field set to 'Increment'.
>
> Now how to determine the value of this field for the newly
> addedd record ?
>


Just about the only way to do this is with the DAO .AddNew method:


Set rs = db.OpenRecordset( _
"SELECT MyANField, MyRequiredField FROM MyTable WHERE FALSE;", _
dbOpenDynaset)

rs.AddNew
rs!MyRequiredField = "Some Default Value"
dwNewANValue = rs!MyAnField
rs.Update

This is in VB syntax because I cannot remember enough dBase language to
know what it looks like in VFP. You should probably get the idea though.

Hope it helps


Tim F

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Deploy Access 2000 appl. developed using Access 2000 .mdb MS_Access_INQ Microsoft Access VBA Modules 4 24th Nov 2008 05:46 PM
Data Corruption - MS Access 2000 backend & 2000/2002 front ends daniel.marionni@gmail.com Microsoft Access 0 19th Feb 2008 09:58 PM
stop office 2000 from updating access 97 to access 2000 =?Utf-8?B?SlI=?= Microsoft Access 1 4th Oct 2006 02:58 AM
Create macro to download access 2000 table to excel 2000 spreadsheet Tushar Microsoft Excel Programming 3 21st Oct 2004 03:44 PM
Access 2002 queries saved as 2000 do not show in access 2000 =?Utf-8?B?Q2xhdWRl?= Microsoft Access 0 6th Jan 2004 04:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:00 AM.