Solved

Filtering a table-type recordset

Posted on 1997-12-01
3
227 Views
Last Modified: 2008-03-06
How can I filter a table-type recordset? Setting the RecordSource property with an SQL statement doesn't seem to work.
0
Comment
Question by:marios
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
pesalone earned 50 total points
ID: 1443119
Dim WS as Workspace
Dim DB as Databse
Dim Filtered as QueryDef
Dim MyQuery as String

Set WS = DBengine.Workspaces(0)
Set DB = WS.OpenDatabase("C:\TEMP.MDB")

Set Filtered = DB.CreateQueryDef("Filtered")

MyQuery = "SELECT * FROM <Your Table> WHERE <Your Field> >= <Some Value>"

Filtered.SQL = MyQuery


0
 

Author Comment

by:marios
ID: 1443120
Where is my Table-type recordset?
0
 
LVL 1

Expert Comment

by:pesalone
ID: 1443121
Hello!

I studied this problem and I think it is impossible!!
At least my VB Manuals didn't know anything about Creating Table type recordset with SQL Query.

Why don't you use a Query like I suggest? You can use it like Table type recordset. You can sort, filter or delete records as well as in table type.

BR    Petri Salonen
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

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…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…
Suggested Courses
Course of the Month8 days, 5 hours left to enroll

617 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