473,385 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Search/Filter

spideynok
Goodmorning!

i have a code
Expand|Select|Wrap|Line Numbers
  1. Private Sub btnFilter_Click()
  2.     Dim strFilter As String
  3.  
  4.     With Me
  5.         If .txtFindCardNumber > "" Then
  6.             strFilter = Replace(.txtFindCardNumber, ", ", ",")
  7.             strFilter = "[Card_Number] In('" & Replace(strFilter, ",", "','") & "')"
  8.         End If
  9.  
  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

✓ answered by NeoPa

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.

5 1852
NeoPa
32,556 Expert Mod 16PB
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
can i ask sir NeoPa what code i need to put on it?
Mar 12 '12 #3
NeoPa
32,556 Expert Mod 16PB
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
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
NeoPa
32,556 Expert Mod 16PB
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

0
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...
3
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...
0
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?
0
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...
2
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...
5
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,...
5
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...
1
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,...
2
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...
9
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. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.