Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
AfterUpdate DLookup Duplicating Table Values
Steve 

14 years ago
Richard,

With the help of your videos and my own trial and error, I have started a new project used for scanning property bags in and out of my database. The property is for a person where it will only be scanned in and out once, and the property bag number will never be used a second time.

I built a continuous form for the ability to scan several bags out at one time, which then creates a property manifest for a report. This is used for tracking what bags, went where, and with who.

I?m running into an issue with my DLookup, where AfterUpdate it pulls the values from the table. When I go to the next row of the continuous form, it duplicates the data in the table. Any idea why? Also, would you suggest another way of doing this instead of a continuous form? The idea is to scan 30-40 bags (one after another) and track when and where they went. Almost like a library system, except I will not be checking the bags back in.

Option Compare Database
Option Explicit

Private Sub BagNum_AfterUpdate()

Me.DateIn = Nz(DLookup("DateIn", "tblPropertyDetails", "[BagNum] = '" & [BagNum] & "'"))
Me.PropertyTypeID = Nz(DLookup("PropertyTypeID", "tblPropertyDetails", "[BagNum] = '" & [BagNum] & "'"))
Me.Notes = Nz(DLookup("Notes", "tblPropertyDetails", "[BagNum] = '" & [BagNum] & "'"))
Me.PropertyDestroyed = Nz(DLookup("PropertyDestroyed", "tblPropertyDetails", "[BagNum] = '" & [BagNum] & "'"))
Me.DetentionID = Nz(DLookup("DetentionID", "tblPropertyDetails", "[BagNum] = '" & [BagNum] & "'"))
Me.PropertyID = Nz(DLookup("PropertyID", "tblPropertyDetails", "[BagNum] = '" & [BagNum] & "'"))

End Sub



Reply from Richard Rost:

Your DLOOKUP statements look fine. Perhaps throw a Docmd GotoRecord Next in there when you're done to force it to go to the next record automatically (with a Docmd GotoControl to force it to go to the next BagNum). Do you have AutoComplete turned on? That might explain why it's duplicating values. Other than that, I'd have to see it to tell you for sure.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

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 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/17/2026 8:03:27 AM. PLT: 2s