Solved

Filtering an Access Query from VB

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Input past end of file vbs script 9 81
add text to end of existing text in file 16 69
MS Access Search and Replace Using VBA 6 57
Visual Studio 2005 text editor 10 35
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

932 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now