B
Brad Kimbrell
I am looking for the proper way to find the primary key (auto-numbered
field) after I perform the .Update method on the recordset.
Sample Code:
rsRecordset.Open(SQL stmt)
if rsRecordset.EOF Then .AddNew
rsRecordset.Fields("FieldName")=strData
rsRecordset.Update
strKey=rsRecordset.Fields("PrimaryKeyID")
The last statement give the error "No Current Record".
Do I have to execute the SQL statement again just to find the ID? I
need this ID in order to insert it into a child table that should be
linked to this parent table.
Thanks in advance for helping a beginner.
field) after I perform the .Update method on the recordset.
Sample Code:
rsRecordset.Open(SQL stmt)
if rsRecordset.EOF Then .AddNew
rsRecordset.Fields("FieldName")=strData
rsRecordset.Update
strKey=rsRecordset.Fields("PrimaryKeyID")
The last statement give the error "No Current Record".
Do I have to execute the SQL statement again just to find the ID? I
need this ID in order to insert it into a child table that should be
linked to this parent table.
Thanks in advance for helping a beginner.