Incremental Search - Pls

  • Thread starter Thread starter Praveen Manne
  • Start date Start date
P

Praveen Manne

Hi,

I have a table, which contains Last Name of the customers

I have a form, which contains a "textbox" and a command button. The textbox
will take last name as input . When I click the command button it will
select the records from table matching the last name.

for eg; if I type "John" in the text box and click the command button, it
will pull up the records which have "john" as its last name.
But if I type "j" it will not pull any records (since j is not last name).

what I want is, if I type "j" it should pull up all the records from the
table , which last name starts with '"j"
like john, jack, joshua ...
and if I type " jo" it should pull up all the records from the table , which
last name starts with '"jo"
like john, joshua, ...
and if I type " jos" it should pull up all the records from the table ,
which last name starts with '"jos"
like joshua ..

How I can do this? Please help.

Thanks
Praveen Manne
 
This is the query I'm using to select the records

SELECT * FROM [tblPhys] Where [LN] like '" & Me![Textbox] & "'% "

But the system is showing, there is an error in that statement. What is the
error in it ?

Thanks
Praveen
 
In Access, the wildcard character is the asterisk (*)

--
--Roger Carlson
www.rogersaccesslibrary.com
Reply to: Roger dot Carlson at Spectrum-Health dot Org

Praveen Manne said:
This is the query I'm using to select the records

SELECT * FROM [tblPhys] Where [LN] like '" & Me![Textbox] & "'% "

But the system is showing, there is an error in that statement. What is the
error in it ?

Thanks
Praveen


Praveen Manne said:
Hi,

I have a table, which contains Last Name of the customers

I have a form, which contains a "textbox" and a command button. The textbox
will take last name as input . When I click the command button it will
select the records from table matching the last name.

for eg; if I type "John" in the text box and click the command button, it
will pull up the records which have "john" as its last name.
But if I type "j" it will not pull any records (since j is not last name).

what I want is, if I type "j" it should pull up all the records from the
table , which last name starts with '"j"
like john, jack, joshua ...
and if I type " jo" it should pull up all the records from the table , which
last name starts with '"jo"
like john, joshua, ...
and if I type " jos" it should pull up all the records from the table ,
which last name starts with '"jos"
like joshua ..

How I can do this? Please help.

Thanks
Praveen Manne
 
Thanks Roger ,

It works!

Praveen
Roger Carlson said:
In Access, the wildcard character is the asterisk (*)

--
--Roger Carlson
www.rogersaccesslibrary.com
Reply to: Roger dot Carlson at Spectrum-Health dot Org

Praveen Manne said:
This is the query I'm using to select the records

SELECT * FROM [tblPhys] Where [LN] like '" & Me![Textbox] & "'% "

But the system is showing, there is an error in that statement. What is the
error in it ?

Thanks
Praveen


Praveen Manne said:
Hi,

I have a table, which contains Last Name of the customers

I have a form, which contains a "textbox" and a command button. The textbox
will take last name as input . When I click the command button it will
select the records from table matching the last name.

for eg; if I type "John" in the text box and click the command button, it
will pull up the records which have "john" as its last name.
But if I type "j" it will not pull any records (since j is not last name).

what I want is, if I type "j" it should pull up all the records from the
table , which last name starts with '"j"
like john, jack, joshua ...
and if I type " jo" it should pull up all the records from the table , which
last name starts with '"jo"
like john, joshua, ...
and if I type " jos" it should pull up all the records from the table ,
which last name starts with '"jos"
like joshua ..

How I can do this? Please help.

Thanks
Praveen Manne
 
Back
Top