Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Tips & Tricks

New Tips Added Weekly!
Click here to get on our Mailing List

   
 
Access Copy Last Record

Copy Last Record

Use DMAX and DLOOKUP to Copy the Last Record Entered

If you are entering a bunch of similar records, this tip will save you time. With one button you can copy the last record entered and any fields you want, while leaving some other fields blank for new data entry. For example, we will copy products and leave the serial number field blank. We will use the DMAX and DLOOKUP functions to accomplish this.


This tutorial explains how to do it...
 


 

Source Code

Here's the source code, if you want to copy and paste it:

Dim ID As Long
ID = DMax("ProductID", "ProductT")
DoCmd.GoToRecord , , acNewRec
ProductName = DLookup("ProductName", "ProductT", "ProductID=" & ID)
SalePrice = DLookup("SalePrice", "ProductT", "ProductID=" & ID)
DateEntered = DLookup("DateEntered", "ProductT", "ProductID=" & ID)
SerialNumber.SetFocus

 

Learn More About DLOOKUP...

I teach DLOOKUP my Access Expert Level 10 course.

Click this link to watch my FREE 2-hour long Access Beginner Level 1 course.

 

 


By Richard Rost   Richard Rost on LinkedIn Email Richard Rost
Click here to sign up for more FREE tips

 

 

 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/28/2024 4:42:18 AM. PLT: 1s