Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

MS Access 2002 Forms applying a filter with command button allowing a field from that form with a wildcard

Posted on 2003-04-01
3
Medium Priority
?
190 Views
Last Modified: 2006-11-17
MS Access 2002 Forms - How do you:
Apply a filter with command button allowing a field from that form with a wildcard.  problem: Filter by Selection selects by exact field value.

assuming I'm in a record where field [last name]= "smith"
how can i structure command button that filters with a wildcard (Smith*) so I get all Smith, Smithson, Smith Jr., etc....

the command button would work on any record so if [last name] = "jones", it would work same way.
0
Comment
Question by:leuchte
  • 2
3 Comments
 
LVL 5

Expert Comment

by:Mike77
ID: 8247312
try :

[last name] like "smith*"
0
 
LVL 5

Accepted Solution

by:
Mike77 earned 100 total points
ID: 8247328
in the after update event of the button use code like :

me.Filter = "[last name] like '" & YourCondition & "*'"
me.FilterOn = true
0
 
LVL 1

Expert Comment

by:DCCoolBreeze
ID: 8247395
If your form does not display the data by using the code above which is correct (remember the closing quotes that need to surround SMITH.  It is hard to see that in the note above) then add one more line me.requery
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question