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 
Pulling info from one table to another
Joanne 

15 years ago
Access 2007 - I have a table (Job Numbers) that gives me autonumbers for the jobs we work on.  It has 3 fields, Job#/LastName/FirstName.  My second table (Applicant List) contains all the client information.  I want to be able to type a Job# in my second table and have it automatically pull the LastName and FirstName field info into the second table. Not every client on the Applicant List will have a Job# assigned so I still need to be able to fill in the LastName and FirstName manually for those that aren't assigned a Job#. How can I do this? Thank you.  Joanne


Richard Pontificates:

Normally, you don't want to have duplicate data in your database. Copying names between two tables like that is generally considered bad database organization. What you should have is a table with your customers and then a table with your jobs. The jobs should be linked to the customers by the customer ID. So your database structure SHOULD look like this:

JobTable
--------
JobID
JobName
Description
CustomerID
etc.

CustomerTable
-------------
FirstName
LastName
etc.

So now if you want to see what Jobs belong to a customer, you have the customer's ID stored in the job table. This is basic RELATIONAL database design, and here is a free tutorial that explains it in more detail.

Relational Table Design in Microsoft Access

HOWEVER, if you really want to type in a job number and have the customer's name copied into the other table, you could do it, but it's going to involve a little VBA programming. You would need a text box to type in the job number and then an AfterUpdate with a DLOOKUP statement to pull in the data and save the duplicate copy in the second table. Here's a tutorial that talks about that:

DLOOKUP Function in Access

But I strongly recommend you consider option 1.

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/22/2026 4:27:35 AM. PLT: 0s