473,402 Members | 2,053 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,402 software developers and data experts.

multiple search using adodc and displaying in datagrid

dear sir,

i m design a contact mgmt interface in vb using access . i want to have multiple search option ,suppose i have four field ,first name ,lastname ,city ,state.
the client can enter this his crietria in any of the above field ,and i want search all records which satisfied the creitria
example
user enter
firstname---mc
lastname---john
city---new jersy
state-new york
and click --------search

then datagrid must show all records meeting the crietria.

can you help me.
Dec 16 '06 #1
2 9979
aaryan
82
dear sir,

i m design a contact mgmt interface in vb using access . i want to have multiple search option ,suppose i have four field ,first name ,lastname ,city ,state.
the client can enter this his crietria in any of the above field ,and i want search all records which satisfied the creitria
example
user enter
firstname---mc
lastname---john
city---new jersy
state-new york
and click --------search

then datagrid must show all records meeting the crietria.

can you help me.
hi mukesh,
think these sort of queries have already occured and been resolved here. anyway, here is one example which will help you.
Expand|Select|Wrap|Line Numbers
  1. "select * from customers where customerID = '" & Text1.Text & "' and city = '" & Text2.Text & "' and country = '" & Text3.Text & "'"
i have a doubt too. is it any of the criteria fields or all of the criteria fields should be entered by the user???
Dec 17 '06 #2
hi mukesh,
think these sort of queries have already occured and been resolved here. anyway, here is one example which will help you.
Expand|Select|Wrap|Line Numbers
  1. "select * from customers where customerID = '" & Text1.Text & "' and city = '" & Text2.Text & "' and country = '" & Text3.Text & "'"
i have a doubt too. is it any of the criteria fields or all of the criteria fields should be entered by the user???

thanks
but sir writting query is not my problem.major problem i m finding is who to display quered data in datagrid.give me the syntex.datagrid is not allowing me show data searched through the query.it show data in single field filtered mode.
code which i m using is
adodc1.recordset.filter="firstname like ' "& text1.text & "%'".
but system does not take this
adodc1.recordset.filter="firstname like ' "& text1.text & "%'and lastname like' " & text2.text &"%'";

my query returns more then one record.

have u seen www.monster.com,how they allow advance search.like thar i want to do.
Dec 18 '06 #3

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

Similar topics

10
by: Jeroen van vliet | last post by:
I have a program that when clicked i want to print 2000 papers, with the names adress etc of customers. So it have to print every record. How to manage it? Jeroen
32
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
1
by: Craig Banks | last post by:
If a row of data in a dataset has a lot of columns the row displaying the data in a datagrid will run way off the screen. What I'd like to do is display a row of data over several datagrid rows so...
2
by: Simon Harris | last post by:
Hi All, I have an app which requires a list of coutries to be displayed, so far I have a datagrid which contains displays the countries Ok, along with flag images, these are also links to my...
1
by: Roy | last post by:
I'm assuming this is amazingly simple and I'm just missing the boat. On the html side of an asp.net page I have a datagrid, a "search" button, and 8 text boxes for search criteria. A user enters...
4
by: Raoul Watson | last post by:
I have a form with an AdoDc control associated to a datagrid. The AdoDC uses a "ConnectionString" such as "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=..." this is...
1
by: steven scaife | last post by:
Hi I have created two user controls that are the basis of two forms. I havent included the form tag in the user controls. one of the controls accepts one input which is a numeric text field...
0
by: | last post by:
I have a question about spawning and displaying subordinate list controls within a list control. I'm also interested in feedback about the design of my search application. Lots of code is at the...
7
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
0
tracyyun
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...
0
agi2029
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.