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 another form on close
Mark Fannin 
      
2 years ago
I have a data entry form and when it closes I want it to requery the subform of that's keeping track of all the previous items.  I don't want to press F5 to refresh all the time.  I have done this before in another database by using VBA.  It was;  Forms!MainMenuF.Form.Requery   That code is not working this time. The list comes from a query and is a subform in MainMenuF.  Thanks in advance.
Mark Fannin OP  @Reply  
      
2 years ago

Mark Fannin OP  @Reply  
      
2 years ago

Mark Fannin OP  @Reply  
      
2 years ago
I made some progress... I got rid of the Query that was the control source for the continuous form.  I made a form based directly on the source table and now the Forms!MainMenuF.Form.Requery works fine.  I guess now my question is:  How to I get the query to be refreshed?   I prefer to use queries for most of my forms.  Thanks again for your advice.
Marc Lievens  @Reply  
    
2 years ago
You make it more difficult than it is. Why make the continuous form a subform of MainMenuF?
You can just add a header and footer for extra buttons and put the requery in the Form_Activate() of MainMenuF.
Marc Lievens  @Reply  
    
2 years ago

Kevin Robertson  @Reply  
          
2 years ago
Forms!MainMenuF.Form.Requery is requerying the Parent Form, not the subform.

Try this syntax:
    Forms!ParentForm!Subform.Form.Requery

Value From a Form
Value From Subform
Mark Fannin OP  @Reply  
      
2 years ago
Got it working by using the following:  
Private Sub Form_Close()
  Forms!MainMenuF.Requery
End Sub
Not sure why I didn't need:  Forms!MainMenuF.Form.Requery - but that doesn't work.  Access error msg read" cannot find Form".  So I took it out and whala, it worked.  Thanks for your help the video references got me on the right track.  All the best to you Kevin.
Richard Rost  @Reply  
          
2 years ago
You only need the .Form for subforms.

Main Form: Forms!OrderF.Requery
Subform: Forms!OrderF!OrderDetailSubF.Form.Requery

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 4:28:05 AM. PLT: 1s