473,385 Members | 1,806 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.

Searching for a specific record in a form

Hello,
I use the VS .NET 2003.
Say I have a Windows form (with C# code, of course) which is connected
to a database to one table. I can browse through the records, but I
don't know how to accomplish a search for a specific record.
I would like to have a button that by clicking it, a response window
will be opened. Say that the search will be according a specific
column of the table, so by filling a value to a Text Box for that
column and clicking an OK button - the desired record will show up.
Any detailed help will be appreciated.

David
Nov 15 '05 #1
1 1720

If you want to search in the table Company for ID 385

dataset["company"].Select("ID = 385");

it returns an array of row that matches the criteria.

If your dataset is connected to a datasource, you can change the filter of
your defaultview property of the table into your dataset. .

That's it :-)

Laurent

"David" <ke*******@yahoo.com> wrote in message
news:ce**************************@posting.google.c om...
Hello,
I use the VS .NET 2003.
Say I have a Windows form (with C# code, of course) which is connected
to a database to one table. I can browse through the records, but I
don't know how to accomplish a search for a specific record.
I would like to have a button that by clicking it, a response window
will be opened. Say that the search will be according a specific
column of the table, so by filling a value to a Text Box for that
column and clicking an OK button - the desired record will show up.
Any detailed help will be appreciated.

David

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Benny Eckert | last post by:
Hi everybody, Me and my colleague use the same DB under win98 Access 2000. He recently upgraded to win2K, same access version. When I search a specific record in a form using a "search...
1
by: Ian | last post by:
I want to open a form at a particular record, but I think I'm running into problems because the recordsource query is executing asynchronously. In the form's open event I use...
3
by: Simone | last post by:
Hi All, I have a Find Record button setup in most of my forms in order to find a specific customer's details. I have just noticed today though that this search will only find the customer if it...
11
by: TheDataGuy | last post by:
Using MS ACCESS 2002 I developed a FORM, and within that FORM, I created and added a SEARCH BUTTON, and then I created a SUB-FORM, so that when an the END USER clicks on the FORM it will POP-UP...
7
by: john | last post by:
In my form I have a master table and a details table linked 1xM. I can search through the whole parent table but I also like to be able to search through the child table fields to find parent...
3
by: mckbill | last post by:
Is there a way I can direct the cursor to a specific field (variable) in a form by typing the field name while in form view? I have a form with many fields, and it would be nice if there were...
3
by: Michiel Rapati-Kekkonen | last post by:
I have a continuous form, with 22 rows on display. I make a change in some row and have the form requeried. (I have to, because the query on which the form is based is not updateable, and the...
20
by: tkip | last post by:
Hello everyone. I have been working on this DB for quite some time and still can't figure out a way to do what I want to do. It's a database that keep track of drawings and engineering change etc....
0
by: PeterSummer | last post by:
Could someone answer a vb.net database question? what is a good way to code a form so that a user could navigate through a dataset ie: MoveFirst, MoveNext, MovePrevious, MoveLast, Update and...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.