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 
Recordset with multi rows
will 

14 years ago
Hi Rick,

Is it possible to move multiple rows of a table to another table with a recordset?  When i try it, it only moves over one record.

the recordset is set up to move the info and it works but only moves the first unit (piece of equipment) instead of the entire list.  do i need to do a loop?

    Dim db As Database
    Dim rs As Recordset
    
    Set db = CurrentDb()
    Set rs = db.OpenRecordset("POL_EquipmentList_tbl", dbOpenDynaset)
    
    rs.AddNew
    
    rs.PolicyNumber = NewPolicyNumber
    rs.EffectiveDate = RENEWAL
    rs.UnitStatus = UnitStatus
    rs.UnitYear = UnitYear
    rs.UnitMake = UnitMake
    rs.UnitType = UnitType
    rs.UnitKind = UnitKind
    rs.UnitVin = UnitVin
    rs.UnitValue = UnitValue
    rs.UnitRadius = UnitRadius
      
    rs.Update
    rs.Close
        
    Set rs = Nothing
    Set db = Nothing


Reply from Richard Rost:

Yes. If you have more than one record, you DEFINITELY need a loop AND you'll need TWO recordsets... one for input (read) and another for output (write).

It MIGHT be easier to do this with an APPEND query followed by a DELETE query.

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/16/2026 12:53:23 PM. PLT: 0s