"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
|