Solved

Filtering an Access Query from VB

Posted on 1998-07-18
2
164 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

832 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