How to use filter codes.

Dezirous

Rafi Ahmed
Local time
Tomorrow, 03:35
Joined
Jul 8, 2009
Messages
71
Respected Experts,

I have a small database with 1 table "tblDocuments" containing 3 fields "ID" (autonumber), "DocNo" (NumberField) & "DocTitle" (TextField). With all these, I've a form including all these fields and a textbox "txtSearch" (unbound) and a button "btnSearch".

Now I want that whenever I type something in txtSearch & press btnSearch, it return all related data from all fields that match with txtSearch.value, Just like built-in Find Dialogue Box.

What could be the simplest method for it.

Respects & thanks in advance.
:)
 
The simplest way is to use Access built in "Filter for:" functionality. You do this by right clicking on the bound field you want to filter on (at run time) and typing in your criteria in the "Filter for:" section of the context menu.

If you really insist on writing additional code to do this (and there are valid reasons for this, but they are not simple), Allen Browne has a nice article you can read: http://allenbrowne.com/ser-62.html

This article explains it better than a short post on a forum could ever.
 
Thanks budy.........
It was really helpful for...............
Thanks a lot.........
 

Users who are viewing this thread

Back
Top Bottom