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 By Date
David Clement 
       
3 years ago
Hello,
I have created a search by date button on a form that I have made. I works, but only after entering it a second time.
What did I do wrong?
Thank you.
Scott Axton  @Reply  
        
3 years ago
Sorry not enough info to help.  Please be more specific. See Rule #2.
David Clement OP  @Reply  
       
3 years ago
I have a query to search by date.:
>=[Enter the Start Date] And <=[Enter The End Date]
The first time I enter a date range, it kicks me back to the start date.
I re enter it, then it's fine.
Scott Axton  @Reply  
        
3 years ago
Please post a design view screenshot of your query.  There has to be something amiss.
Kevin Yip  @Reply  
     
3 years ago
If you use the form's Filter and FilterOn properties, make sure you set the Filter first, *then* set FilterOn to true.  FilterOn actually applies the filter, so it needs to be done last.  If you do it in the wrong order...

If you set FilterOn to true first, then set the Filter:

    MyForm.FilterOn = True
    MyForm.Filter = "[ID] = 1"

then you have to set FilterOn to true again to actually apply the filter.  That may be why you had to do it the second time to make it work.
David Clement OP  @Reply  
       
3 years ago

Kevin Robertson  @Reply  
          
3 years ago
In your original post you said you are using a button on a form. The code behind the button may prove useful also.
David Clement OP  @Reply  
       
3 years ago
It is just the code that Access uses when you select "Run Query" option, so I guess it is a macro.

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/1/2026 9:48:54 PM. PLT: 1s