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 
Recordsetclone Subform
steve m 

13 years ago
Richard,

I searched previous post but didn't see additional information about a recordsetclone.

My main form is a continuous form. In my form footer I have a subform, also a continuous form.

I am attempting an after update of my main form on a check mark field that will update the form footers subform.

Right now, my code updates only the first record of the subform, not all the records. It also produces an error if no record exist for the subform. Can you point me in the right direction? I want to stay with VBA to use the similar code on anothe form rather than doing an update query.

Private Sub Process_AfterUpdate()
If Me![Process] = -1 Then
   Me![Process Date] = date

Dim rst As DAO.Recordset
Set rst = Me.SubfrmDetaineeReviewGroupOut.Form.RecordsetClone

        With rst
        Do Until rst.EOF

            'check to see if bagnum has value first
            If IsNull(Forms![Detention Group Edit1]!SubfrmDetaineeReviewGroupOut.Form!BagNum) Then Exit Do
            Forms![Detention Group Edit1]!SubfrmDetaineeReviewGroupOut.Form!Combo268 = 2
            rst.MoveNext
            Loop
            rst.Close
            End With
           Set rst = Nothing

MsgBox "My Message.", vbOKOnly, "Update when applicable"
    Me![Reason for Detention].SetFocus
    Me![Reason for Detention].Dropdown
Else: Me![Process Date] = ""
'check to see if bagnum has value first
If Not IsNull(Forms![Detention Group Edit1]!SubfrmDetaineeReviewGroupOut.Form.BagNum) Then
    Forms![Detention Group Edit1]!SubfrmDetaineeReviewGroupOut.Form.Combo268 = 1

End If
End If
End Sub


Reply from Richard Rost:

I don't like recordsetclones. Never have. Tell me what you're trying to DO (instead of showing me what you've got that's not working) and I'll try to suggest the best solution.

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 5:08:42 PM. PLT: 1s