|
-
Jun 4th, 2013, 06:23 AM
#1
Thread Starter
Member
[RESOLVED] Multi field search for mdb
Guys, really I am tired for trying to solve this:
I want to make an only textbox that if u type the keyword the datagrid will filter the search result from mdb.
I am glad to receive ur help
T&R,
VH
Sorry for my bad english, You may correct my english if there is any mistake.
-
Jun 4th, 2013, 07:22 AM
#2
Re: Multi field search for mdb
Build sql string first:
sqlSearch = "select from Table1 where Field1 like '%" & Text1.Text & "%' or Field2 like '%" & Text1.Text & "%'"
...then open recordset based on that sql.
Or something of that nature should work... however you didn't even explain what you need so my reply is based on your thread title.
-
Jun 4th, 2013, 07:21 PM
#3
Thread Starter
Member
Re: Multi field search for mdb
Thanks Rhinobull u solved my problem
-
Jun 4th, 2013, 07:38 PM
#4
Re: [RESOLVED] Multi field search for mdb
Be careful though. The characters %, _, #, [, ], and - all have special meaning within patterns. If the user enters any of these it may produce undesired results.
One fix might be to replace any of these characters in the user's input with _ (underscore, i.e. "match any one character"). Another might be to scan for these and reject the operation with an error message if found.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|