473,854 Members | 1,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ


14 New Member

i have a code
Expand|Select|Wrap|Line Numbers
  1. Private Sub btnFilter_Click()
  2.     Dim strFilter As String
  4.     With Me
  5.         If .txtFindCardNumber > "" Then
  6.             strFilter = Replace(.txtFindCardNumber, ", ", ",")
  7.             strFilter = "[Card_Number] In('" & Replace(strFilter, ",", "','") & "')"
  8.         End If
  10.         .Filter = strFilter
  11.         .FilterOn = (strFilter > "")
  12.     End With
  13. End Sub
this is the code on the button connected with a text box which i use when im searching a record.

the card number is compose of 16 digits. and i must enter 16 digits just to search for that record.

I want to ask if how would i do. so i can search on it even i input 6 numbers only etc..

Thank you in advanced. (~_^)olll
Mar 12 '12 #1
5 1864
32,584 Recognized Expert Moderator MVP
You can use either a list or wild-cards in filtering, but not a list of wild-card comparisons.

For more see Find Wildcard Characters in an Access Database.
Mar 12 '12 #2
14 New Member
can i ask sir NeoPa what code i need to put on it?
Mar 12 '12 #3
32,584 Recognized Expert Moderator MVP
You can ask, but until you explain what you're trying to do more clearly I won't be able to help. I can see you're doing some sort of filtering, but the details make little sense to me.
Mar 12 '12 #4
14 New Member
Yes filtering.. and also like i use it as search. i had a unbounded text box.. and a find record button where i put that code.. and its like when.. example.. im looking for a card number 12345678 for me to show that data.. i need to put exact data like 12345678.. and i want to do is when i put 1234567.. all data that has 1234567 will show.. like 12345671, 12345678, 12345679.. like that..

Again thank you sir :)
Mar 12 '12 #5
32,584 Recognized Expert Moderator MVP
You'd use the wild-card character that matches your database. This is all explained fully and clearly in the linked article.
Mar 12 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Dirk Hagemann | last post by:
Hi! I want to get the properties of all the computer-accounts of an ActiveDirectory structure (Microsoft). I know that could be done by using "Search Filter Syntax" with LDAP-Dialect or SQL-Dialect. I found a lot of information about these dialects, but no example how to use this in an python-script. Does anybody have a simple example for me, how to get some information out of AD?
by: Dirk Hagemann | last post by:
Hi! I asked here a few weeks ago the same question but the answer of Tim Golden didn't really help yet. I'd like to know how to set up a query for all computer-accounts in a special part of Active Directory by using LDAP. Example: all computers with a name like "ABC*" at "..., ou=Production,
by: John Rager | last post by:
I am using the Index search server that comes with MS IIS 3.0. The search works ok but how do I limit the search to only HTML/ASP files and not include MS Office files in the search results?
by: jeffreycope | last post by:
Let's say I have a datagrid displaying data that's been filtered via a search page. Now I bring up a maintenance page and add a new record and this new record doesn't match the search / filter criteria from the previous lookup page. On return from the maintenance page, would you.... - Display the datagrid with only the record added - Only show the filtered data - Show the filtered data and the record just added - Other :)
by: AJ | last post by:
Hi all, An easy question! I have a datagrid that can needs to provide filter functionality. I have three controls above the grid (txtSearch,ddlSearchBy,btnSearch) btnSearch calls btnSearch_Click.
by: djpaul | last post by:
Hello, I trying to make an program for my cd collection. I wanted to insert all my cd's into a access database. Then, with the program, i want to search for a title or artist. So, my question is, how can i do that if i look for example" bon jovi - It's my live", i type in the textbox "bon jo" that he only display all the songs/artists with these letters at the right side.(i mean, on the left side the textbox and the right side the whole cd...
by: keithsimpson3973 | last post by:
Hi, I have an Access 2003 database I am running with vb 6. I have one report that I want to filter on the Start_Date and Stop_Date in a scheduling database. I would like to enter a stop and stop date, then have it look for anything that the start date or stop date range falls into the start and stop date I specify. I know how to do it if searching only the start_date or only the stop_date,but can't figure out how to make it look at both. I...
by: schwepZ | last post by:
Hello i have to make a form which looks like this http://jarve.edu.ee/~jass/sample.jpg In tables i have Gategories table (GategoryID, GategoryName) and Products table (ProductID, ProductName, UnitsInStock, Price) and in this form gategories should appear in first combo box. When i click on a gategory then in the list box next to it should appear all product which match and so units in stock and price i have read many forums and i...
by: redbenn | last post by:
I am trying to set up a filter form that will filter data on another in a certain field. Right now I have a text box (Text13) and a Command Button. The Button code is: Private Sub Command15_Click() Dim code As String Dim inboundform As String
by: metube | last post by:
Hi, I found this code for a search filter. But I need it adapted to a single criteria. Im not exactly an expert in SQL...but I was hoping someone here would be kind enough to help me out. Thanks! ' ************************************* ' ' Search Form Example
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.