Print Page | Close Window

Access - get previous record’s fields

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=6301
Printed Date: 28 March 2026 at 9:01am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Access - get previous record’s fields
Posted By: yuhui
Subject: Access - get previous record’s fields
Date Posted: 10 October 2003 at 1:19am
Hi there,

I have an Access database with 1 table. I'm designing a form that has 4 fields to add records to this table. When the user first enters the fields for the day, 3 of the fields will stay the same for the rest of the day, e.g. 1 of the fields is the current date. (The database isn't used 24/7, so the form doesn't need to check if a new day has come.)

I also have a button on the form for the user to press to save the record. When this button is pressed, a new form should come up with the 3 fields already filled in with the previous record's values.

How do I go about doing this? I already have the button that uses this event:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Thank for any help! Sample code will be helpful too.



Replies:
Posted By: Gullanian
Date Posted: 10 October 2003 at 10:28am

Well first off you would need a unique identifier (or primary key as its otherwise known) to identify each record.  When the page is loaded it should read the ID from a querystring then pull that records data from the database...

Anyway im not much good at explaining this, bruce does it a lot better in his ASP tutorials, go to ASP at the top of this page.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net