Solved

Filtering an Access Query from VB

Posted on 1998-07-18
2
162 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
Comment Utility
Edited text of question
0
 
LVL 1

Accepted Solution

by:
stevesm earned 60 total points
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

743 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