Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Courses > Access > Expert > X12 > < X11 | X13 >
Back to Access Expert 12    Comments List
Upload Images   @Reply   Bookmark    Link   Email  
Requery
Richard Van Wagoner 
      
8 months ago
I am watching Access Expert 12 Lesson 1. Is there a way to get rid out the Requery Command Button And just use VBA to do the same thing automatically. Maybe an After update event?
Kevin Robertson  @Reply  
          
8 months ago
Me.Requery
Alex Hedley  @Reply  
            
8 months ago
There's a button you can click to convert macros to VBA.
Richard Van Wagoner OP  @Reply  
      
8 months ago
Kevin Where would you put the me.requery code at?
Sami Shamma  @Reply  
             
8 months ago
Richard, you put it in the event that you needed to update all the records in your continuous form or a list box. in other words, it depends on what changes have you made and where and then you trigger it from there
Sami Shamma  @Reply  
             
8 months ago
Commonly done in an after update on a field you just changed
Richard Van Wagoner OP  @Reply  
      
8 months ago
I am following the lesson mentioned above, so I am making changes in the orderF and want the reflected in the orderlistF without having to click on the command button.
Kevin Robertson  @Reply  
          
8 months ago
Add this code to the Close event of the OrderF:

Private Sub Form_Close()

    If CurrentProject.AllForms("OrderListF").IsLoaded Then
        Forms!OrderListF.Requery
    End If
    
End Sub


This will Requery the Order List whenever the Order Form is closed.
It also makes sure OrderListF is loaded so you don't get an error if it is not open.
Richard Van Wagoner OP  @Reply  
      
8 months ago
Thanks this is just what I need!
Richard Van Wagoner OP  @Reply  
      
8 months ago
Can this code be duplicated in the same Close event only with another Form?
Such as Private Sub Form_Close()

    If CurrentProject.AllForms("OutstandingInvoiceListF").IsLoaded Then
        Forms!OutstandingInvoiceListF.Requery
    End If
    
End Sub
Kevin Robertson  @Reply  
          
8 months ago

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Expert 12.
 

 
 
 

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 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 7/14/2025 6:45:47 PM. PLT: 1s