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 
Search Erases SubForm
Giovanni Miranda 
    
3 years ago
Hello,

I've got this code for Searching a Particular Field:

Private Sub SearchAirportNameBtn_GotFocus()
    DescriptionLabel = "Click To Search For A SPECIFIC Airport Name"
End Sub

Private Sub SearchAirportNameBtn_LostFocus()
    DescriptionLabel = ""
End Sub

I get the Search Dialog Box and I enter the airport name, but...when I hit the ENTER key it brings the correct Record up but the SubForm is completely empty.

Thoughts...
Giovanni Miranda OP  @Reply  
    
3 years ago
Update:

When I close the Form and come back into it, everything is there in the SubForm like nothing ever happened...????
John Davy  @Reply  
         
3 years ago
What code do you have to do the Search? Please post it.  John
Giovanni Miranda OP  @Reply  
    
3 years ago
Sorry about that, here is the CODE:

Private Sub SearchAirportNameBtn_Click()
    Dim S As String
    
    S = InputBox("Please Enter Airport Name", "SEARCH For A Specific Airport Name")
    If S = "" Then Exit Sub
    
    Me.Filter = "AirportName LIKE ""*" & S & "*"""
    Me.FilterOn = True
End Sub

...attachements
Giovanni Miranda OP  @Reply  
    
3 years ago

Giovanni Miranda OP  @Reply  
    
3 years ago

Giovanni Miranda OP  @Reply  
    
3 years ago
Update:

I also have another Search Macro (Embedded Macro) on the same form, when I use that I don't have a problem with the SubForm Data disappearing.  Why is that?
Giovanni Miranda OP  @Reply  
    
3 years ago
Update:

I just realized something while I was racking my brain out here...it looks as if the SubForm is being filtered as well as the Form itself.  I clicked on the filter button itself and low and behold the data showed back up!  Someone needs to explain to me why this is happening.  I'm sure there's someone out there that's come across this as well.  Is it a fluke?  Or is it part of the programming of ACCESS DB itself?

Is there a way that that filtering of the SubForm can be denied and or corrected?

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/2/2026 1:31:32 AM. PLT: 0s