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 
Insert into table
Masih Ostad Novin 
     
2 years ago
Hi. I want to insert 2 items from one table into the same row in another table. See picture below. In first table I have 2 LotNr in 2 rows (A25E25) and (6666) with two different IDs. I want to insert them to second table as LotNr1 and LotNr2 with same ID. How can I do that? Is that possible?

Best
Masih
Masih Ostad Novin OP  @Reply  
     
2 years ago

Ludwig Willems  @Reply  
      
2 years ago
volgen :)
Adam Schwanz  @Reply  
           
2 years ago
I don't understand what you're doing from the tables alone, how are you picking the records to merge from the left? Is it on a form? You just pick two records and merge them into one? Do you have like two combo boxes to pick the two combinations? If so, it would just be a simple currentdb.execute insert or update statement.

CurrentDb.Execute "Insert Into CockTailLotT (LotNr1,LotNr2) VALUES (""" & LotNrCombo1 & """,""" & LotNrCombo2 & """)"

Or the update variant if the record in CockTailLotT already exists, you may also need some criteria for the where clause but I can't tell from the one picture alone.

If you are trying to only work in the tables, I don't think you can do it, you would need some kind of autokeys kind of macro to run code, if even possible.
Masih Ostad Novin OP  @Reply  
     
2 years ago
Yes. I am going to use forms. Table no. 1 is a linked table from another database. I don't know just yet if I am going to use combo boxes but textbox maybe. I am not sure yet of the design. Thanks for helping.

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/6/2026 10:45:25 PM. PLT: 0s