Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > VBA / Office Integration > Word, PowerPoint, Outlook, and Other Office Products > Search function in VB6 Form for an Access 2000 dbase


Reply
 
Thread Tools Display Modes
  #1  
Old 10-16-2003, 02:11 AM
LeChat LeChat is offline
Newcomer
 
Join Date: Oct 2003
Posts: 20
Question Search function in VB6 Form for an Access 2000 dbase


hello all,

I am still in the process of learning VB6, but I made a little app allready. I have a access database with one table and quite a lot of records. Now i created a form in VB that shows all related fields in the database. i can scroll through, add delete etc. now i want to be able to search for data in the dbase. i created a cmd button that opens a search window...much like the one in IE for example. So i have a text box and a find button. from this form i want to search through the dbase and if a match is found goto to that specific record. closing the search form and all that is no problem, but i can't seem to find the appropriate commands to make this search happen.

any info is highly appreciated.

Regards
Reply With Quote
  #2  
Old 10-16-2003, 04:34 AM
KnooKie KnooKie is offline
Senior Contributor
 
Join Date: May 2003
Location: London
Posts: 802
Default

Based on whatever search criteria is entered you can execute a SQL SELECTstatement on the table to grab the correct record. It is then just a matter of opening a recordset on this SQL statement to display the searched for record.
Reply With Quote
  #3  
Old 10-16-2003, 06:05 AM
Timbo's Avatar
Timbo Timbo is offline
Green-Eyed

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Bangkok, Thailand
Posts: 10,261
Default

Or there's the ADO 'Seek' method of the Recordset object...
__________________
"He's not the Messiah. He's a very naughty boy!" - Brian's mum

Can't find the answer? >> Try something new!
Become a Professional
Reply With Quote
  #4  
Old 10-16-2003, 06:18 AM
LeChat LeChat is offline
Newcomer
 
Join Date: Oct 2003
Posts: 20
Default

Quote:
Originally Posted by Timbo
Or there's the ADO 'Seek' method of the Recordset object...




hmm i have been playing with this but can't seem to get the syntax in order, is it too much asked to give a small example on this?

thanks for the effort
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
97 vs 2000 Access form Alee Word, PowerPoint, Outlook, and Other Office Products 0 06-04-2003 02:05 PM
need help! i'm a beginner geekool General 7 04-26-2003 12:44 AM
How to connect search textbox in Access Query SQL code from VB form Erik Database and Reporting 3 02-02-2003 04:01 PM
MS Winsocket gibson General 3 07-20-2001 10:03 AM
link function to textboxes golash General 2 05-03-2001 11:57 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->