|
-
March 1st, 2001, 02:52 AM
#1
Getting data from the latest Access record
Hi everyone,
I need some help with MS Access.
I need to get information from a specific field in the latest record (to write it in some textbox), and then in a new record write some data to the same field.
I tried to get the last record by using "movelast" function and then, in the new record I opened I wrote the information.
but what accually happent is that the data I wanted to write in the new record was writen down both in the new record and the latest one (deleting previous data in that field).
I hope someone can help me.... I'm wasting a lot of time on this thing....
thanks, Shiry
-
March 1st, 2001, 08:41 AM
#2
Re: Getting data from the latest Access record
Use movelast method to get to your last record...
then assing the data you want to transfer down into variables..
then use rs.AddNew method to make a new record.
rs will be pointing to the new record.
rs.fields("fieldname1") = variable1
rs.fields("fieldname2") = newvalue2
etc.
'
when done,
rs.update will add the new record to your database.
Hope this helps and
May the Force be with you.
-
March 1st, 2001, 08:43 AM
#3
Re: Getting data from the latest Access record
Do you use Data Bound Controls? If so, when you add a new record, you are leaving the last one and the last one gets update from Data Bound control.
Vlad
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|