Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Work Order Lessons    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Access Work Order Seminar
Alex Hedley 
           
15 years ago
Hi Daniel,

When I made a search form in a database I wanted to search for a person so I created a text box then based a query using the value entered and searched for either a first name or a last name.

The key here is to use an 'OR' with 'LIKE' and the '*' wildcard
I have wrapped the search value in '*'s so that it will find a value that contains that character(s)


SELECT StudentsT.ID, StudentsT.Form, StudentsT.Forename, StudentsT.Surname
FROM StudentsT
WHERE (((StudentsT.Forename) Like "*" & [Forms]![StudentsF]![DescriptionFilter] & "*"))
  OR (((StudentsT.Surname) Like "*" & [Forms]![StudentsF]![DescriptionFilter] & "*"));


(Should really strip the StudentsT. as it isn't necessary as I only have one Table.)

Query Builder OR

So you are referencing the textbox on the form with [Forms]![FORMNAME]![CONTROLNAME] and searching in the (TABLENAME.FIELDNAME)

All you need to do for your phone number search is add another OR and amend the table/fields to use yours.

There is a Seminar planned for Searching, approx release - Jul 25 [Production Schedule]

There is a Multi Field Search Form tip on this site that might also be useful.

There is a version on the Waiting List that you can vote on too.

Alex

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Work Order Lessons.
 

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/25/2026 1:02:57 PM. PLT: 1s