-
Hello!
I have kind an annoying problem ;).
The thing is that I have in my DB table field which is AutoNumber. And in that table I add another record. Is there any other way to retrieve that field's value without loading whole recordset, because I need that number for adding it to other records in some other tables that are referencing to just added record.
Any suggestions?
-
try this:
Code:
dim db as database
dim rs as recordset
dim num as long
set db = opendatabase("my database")
set rs = db.openrecordset("my table")
if not rs.eof then
rs.movelast
num = rs.field
set rs = nothing
-
Yes, but I still have to reopen recordset.
I'd like to know if there is any way to retrieve field value without reloading whole recordset.
Any ideas?
-
Oh, I forgot to tell: I'm using DataEnvironment
-
perhaps run a query on that field only
and have it return one record in a
descending order, this will give you the last
record