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 / May 2005

Tip: Looking for answers? Try searching our database.

partial input a typical question for typical guys

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
san - 25 May 2005 19:26 GMT
Hi Friends,
I need some help in devloping a simple query. I developed a database
application which will take a user "FIRST NAME" or " Last name" or BOTH to
retive his detials. The problema here are:

1) If I give only partial name like" JO" it should return all names which
had JO in theier name

EX:    input : JO
         output:   JOHN, JOE. JOESPH, ROJO
2) If I give a name it should retun all names wihch had that input.

EX:         input: ROSE
              output: ROSESMITH, JANNISROSE.....

I appriciate if any one who send or give the code for  the query or VBA or
ASP code.(Anyformat)
Thanks
SAN
James - 25 May 2005 19:35 GMT
use wildcards
i.e.

select * from table1 where firstname like 'JO*'

> Hi Friends,
> I need some help in devloping a simple query. I developed a database
[quoted text clipped - 15 lines]
> Thanks
> SAN
SAN NAN - 25 May 2005 19:45 GMT
Thx for your reply but its not working, I am using this query in ASP,but it
isnot working Can you know another way?
Thx

> use wildcards
> i.e.
[quoted text clipped - 20 lines]
> > Thanks
> > SAN
James - 25 May 2005 21:45 GMT
can i see some of your code?

> Thx for your reply but its not working, I am using this query in ASP,but
> it
[quoted text clipped - 28 lines]
>> > Thanks
>> > SAN
SAN NAN - 25 May 2005 21:54 GMT
Yes you can.

strFirstName=Request.Form("txtFirstName")
strLastName=Request.Form("txtLastName")

strSQL=" Select * from Employee_Names where Employee_Names.FIRST_NAME LIKE
'" & strFirstName &"' OR Employee_Names.LAST_NAME='"& strLastName &"'"

This si the code for my query.

> can i see some of your code?
>
[quoted text clipped - 30 lines]
> >> > Thanks
> >> > SAN
James - 26 May 2005 00:38 GMT
strSQL=" Select * from Employee_Names where Employee_Names.FIRST_NAME LIKE
'" & strFirstName &"*' OR Employee_Names.LAST_NAME='"& strLastName &"*'"

use *'s like i did in the above suggestion.

> Yes you can.
>
[quoted text clipped - 43 lines]
>> >> > Thanks
>> >> > SAN
John Spencer (MVP) - 26 May 2005 01:42 GMT
Perhaps

strSQL=" Select * from Employee_Names where Employee_Names.FIRST_NAME LIKE
'*" & strFirstName &"*' OR Employee_Names.LAST_NAME='"& strLastName &"'"

OR strSQL=" Select * from Employee_Names where Employee_Names.FIRST_NAME LIKE
'%" & strFirstName &"%' OR Employee_Names.LAST_NAME='"& strLastName &"'"

> Yes you can.
>
[quoted text clipped - 40 lines]
> > >> > Thanks
> > >> > SAN
 
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.