Searching?

H

Harmannus

Hallo,

I made a custom search form on my main form but i am not satisfied with the
result. I disabled the default toolbar. On searching and showing it filters
the results. I do not want to bother my costumer with a disable filter
button.

Anybody a suggestion on how to implement a good search. In fact i only need
to search on 2 fields. Ordernumber and company name.

Any examples would be great....

Thanx in advance

Regards,

Harmannus
 
N

Nikos Yannacopoulos

Harmannus,

Not sure I'm with you 100%, but I thought I'd give it a
shot:

Forms(ActiveForm).Filter = "Fieldname = '" & searchvalue
& "'"
Forms(ActiveForm).FilterOn = True

filters on field,

Forms(ActiveForm).FilterOn = False
resets

Does this help?
Nikos
 
A

Albert D. Kallal

I just put a text box on the top of the form, and then use a continues
sub-form.

In the after update event of those two text boxes, you simply stuff the sql
into the sub-form. No filters needed!

dim strSql as string


strSql = "select * from tblCustomer where LastName like '" & me.txtLastNaem
& "*'"

me.MySubForm.Form.RecordSouce = strSql

The above would display a nice grid match of all the last names that start
with whatever the user typed in.

Here is some screen shots of the above code in action. I also explain how a
good search screen should work:

http://www.attcanada.net/~kallal.msn/Search/index.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top