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
Leon Heick 
    
4 years ago
Refreshing or requerying a continuous form when returning to it.

I have a continuous form with a button that opens a form to edit data in the selected record.
My VBA code works find until I split the database. After splitting the database, it will not do the requery.
How do I refresh the recordset in the continuous form whenever I come back to it.

The following is my VBA code

Option Compare Database
Dim doaquery As Boolean


Private Sub Findbtn_Click()
Me.Requery
End Sub

Private Sub Form_Current()

Me.Requery
End Sub

Private Sub Lookupbtn_Click()
  DoCmd.OpenForm "LongTermVehiclesF", , , "VehicleID=" & Me!VehicleID
  doaquery = True
  
End Sub

Private Sub Lookupbtn_GotFocus()

    If doaquery Then Me.Requery
    doaquery = False
End Sub
Adam Schwanz  @Reply  
           
4 years ago
Have you tried just putting it in the on close event of the LongTermVehiclesF?

Forms!FormName.Requery
Leon Heick OP  @Reply  
    
4 years ago
Thank you for your suggestion but I was unable to make this work. I have googled refreshing or requerying a continuous form when returning back to the continuous form and everything I try does not work with a split database. There are a lot of frustrated people. Do you have another suggestion? Thank you!
Richard Rost  @Reply  
          
4 years ago
It really shouldn't matter whether your database is split or not. Access treats those tables the same whether they're local or linked. Does it work with a manual Requery button?
Leon Heick OP  @Reply  
    
4 years ago
It should, but it does not!
Richard Rost  @Reply  
          
4 years ago
Very weird. And you know what I say for weird problems? Run down the Troubleshooter. If you check all of those things and are still having problems, let me know. I'll try to recreate it on my end.

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 1:51:03 PM. PLT: 1s