Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / October 2007

Tip: Looking for answers? Try searching our database.

HELP!!!!!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Puck - 31 Oct 2007 02:50 GMT
1. How would you make a query that allows users to enter a letter or a few
letters and selects all Customers Last Name that have those letters ANYWHERE
in the name?  
2.  How would you make a query that displays dates like this May 2-10 and
June 2-10 using the Between Operator?

HELP ME PLEASE
pietlinden@hotmail.com - 31 Oct 2007 03:43 GMT
> 1. How would you make a query that allows users to enter a letter or a few
> letters and selects all Customers Last Name that have those letters ANYWHERE
[quoted text clipped - 3 lines]
>
> HELP ME PLEASE

one question at a time... works better that way...
1. Are you looking or a string inside the name?  Like "pha" in
"alphabet"? or "p*h*a" in "Philadelphia"?

Sounds like you're looking for LIKE

SELECT Fname, LName
FROM SomeTable
WHERE LName LIKE "*pha*";

if that doesn't do it, try posting an example field value (or a few...
enough for everyone to get an idea of what you mean).

Pieter
Marshall Barton - 31 Oct 2007 05:11 GMT
>1. How would you make a query that allows users to enter a letter or a few
>letters and selects all Customers Last Name that have those letters ANYWHERE
>in the name?  
>2.  How would you make a query that displays dates like this May 2-10 and
>June 2-10 using the Between Operator?

Use a criteria something like this:
    Like "*" & [Enter a few letters] & "*"

You want dates without concerns for the year???  Try using a
calculated field with an expression like this
    Month(dt) In (5,6) And Day(dt) Between 2 And 10
and set its criteria to True

Signature

Marsh
MVP [MS Access]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.