Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Access - get previous record’s fields
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Access - get previous record’s fields

 Post Reply Post Reply
Author
yuhui View Drop Down
Newbie
Newbie
Avatar

Joined: 10 October 2003
Location: Singapore
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote yuhui Quote  Post ReplyReply Direct Link To This Post Topic: Access - get previous record’s fields
    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.
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.