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 
Requery Issues using VBA
Joe Sutcliffe 
     
2 years ago
I have form that has tabs in in it.  In one of the tabs I have placed 2 subforms.  One subform is used for selecting documents and placing the like to the document in the document table.  The second subform displays the documents with a button to view them. I am using this VBA code in an afterinsert event "Forms![Contact Details]![frmContactDocSubForm].Form.Requery and get a run-time error 2465.  All of the names in the code are correct.  I have decompiled the database and recompiled it and have done a compact and repair, rebuilt the forms from scratch and still get the 2465 error message.  I have another form in the database that I am using this code to preform the same function and it works just fine.  Any thought or suggestions would be appreciated.  Thank you.
Joe Sutcliffe OP  @Reply  
     
2 years ago

Adam Schwanz  @Reply  
            
2 years ago
So is this field on a subform? If so you need to use different syntaxValue From a FormValue From Subform
Kevin Robertson  @Reply  
          
2 years ago
Try this syntax.

    Forms("[Contact Details]").Controls("frmContactDocSubForm").Form.Requery
Joe Sutcliffe OP  @Reply  
     
2 years ago
Hi Kevin, thank you for replying.  I tried the suggested code and get the same error.
Kevin Robertson  @Reply  
          
2 years ago
Please post some screenshots of your form in Design View and the property sheet for both Forms (Parent and Subform) showing the Name property.
Joe Sutcliffe OP  @Reply  
     
2 years ago
Hi Kevin, hopefully the attached is what you are looking for.  Thank you.
Joe Sutcliffe OP  @Reply  
     
2 years ago

Joe Sutcliffe OP  @Reply  
     
2 years ago

Joe Sutcliffe OP  @Reply  
     
2 years ago

Kevin Robertson  @Reply  
          
2 years ago
The name of the Subform...

Forms![Contact Details]![Contact Document List].Form.Requery

You were referring to the Source Object which is: frmContactDocSubForm
Joe Sutcliffe OP  @Reply  
     
2 years ago
Thank you Kevin.  That worked!  I appreciate your help.

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/7/2026 12:58:53 AM. PLT: 0s