Solved

Filtering an Access Query from VB

Posted on 1998-07-18
2
165 Views
Last Modified: 2010-05-03
I want to open an access db using vb code, and change the dbgrid Recordset source depending on sql code.  Is this possible?

Lets assume that I have an access query that has 20 names, I want to write code that depending on what name is in a textbox in VB, it will pull only those records in vb.  

If that is not possible, then I would choose to write code to change the sql in the actual access database (from within vb)  to fit what is in the text box in VB form.  Is this possible?

Thanks for your help!
0
Comment
Question by:thien
2 Comments
 

Author Comment

by:thien
ID: 1466187
Edited text of question
0
 
LVL 1

Accepted Solution

by:
stevesm earned 60 total points
ID: 1466188
Either way is possible if your willing to write the SQL for the dbgrid based on your text box. Although its easier to use the data form wizard to do what your looking to do and modify the code.
Let me know if this is what your looking for if not reject my answer and comment back

Regards Stevesm
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question