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 as You Type
Colin Eastaugh 
     
12 months ago
"Search as you type" - thanks to Richard for recording a video(s) on the wonderful search option.  I have now incorporated the code into most of my forms. For instance:

Private Sub SBox_Change()
    Me.RecordSource = "SELECT * FROM qryfrmDateTSXSumX " & _
        "WHERE Tick LIKE """ & SBox.Text & "*"" ORDER BY tblDateTSX.Tick"
    SBox.SetFocus
    SBox.SelStart = Len(SBox.Text)
End Sub


The one problem is typing in text that produces a null return, I then get an error message, which is a nuisance.  I would rather have no reply.

I have tried including

DoCmd.SetWarnings False
DoCmd.SetWarnings True


But this doesn't seem to work unless I am inserting the additional lines of code in the wrong places.

Can anyone help?
Donald Blackwell  @Reply  
       
12 months ago
You can use the SetWarnings Falseas the first line of the sub then the SetWarnings True as the last line before end sub. If this still isn't working, then, while not preferred, you can put "On Error Resume Next" before the Me.RecordSource line instead of using SetWarnings.
Colin Eastaugh OP  @Reply  
     
12 months ago
Donald you are a star, many thanks.

Don't tell anyone, but "On Error Resume Next" seems to be best solution for me.

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 8:33:16 AM. PLT: 0s