473,769 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

built-in filter functions failing when form recordsource is set to recordset

Is it possible to use the built-in filter functions (ie. "Filter by
Selection", etc..) when a form's recordsource has been set to a
recordset object during the load event. When I try to do this, I
receive the message "Cannot apply filter on one or more fields
specified in the filter property".

here is the code for the recordset creation:

Set conn = New ADODB.Connectio n
Set rsSQL = New ADODB.Recordset
gstrSQL = "SELECT CheckList.* " & _
"FROM CheckList " & _
"ORDER BY CheckList.RunDa te DESC ,
CheckList.LoanN umber;"
rsSQL.Open gstrSQL, conn, adOpenStatic, adLockReadOnly
Set Me.frmCheckList .Form.Recordset = rsSQL

It doesn't matter if the recordset is ADO (as in this example) or DAO.
For DAO recodsets, I receive a different error.
Nov 13 '05 #1
2 6687
You can't, sorry. :-(
--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies
Windows International Division

This posting is provided "AS IS" with
no warranties, and confers no rights.

"Patrick Gonzalez" <pa************ **@oomc.com> wrote in message
news:f3******** *************** **@posting.goog le.com...
Is it possible to use the built-in filter functions (ie. "Filter by
Selection", etc..) when a form's recordsource has been set to a
recordset object during the load event. When I try to do this, I
receive the message "Cannot apply filter on one or more fields
specified in the filter property".

here is the code for the recordset creation:

Set conn = New ADODB.Connectio n
Set rsSQL = New ADODB.Recordset
gstrSQL = "SELECT CheckList.* " & _
"FROM CheckList " & _
"ORDER BY CheckList.RunDa te DESC ,
CheckList.LoanN umber;"
rsSQL.Open gstrSQL, conn, adOpenStatic, adLockReadOnly
Set Me.frmCheckList .Form.Recordset = rsSQL

It doesn't matter if the recordset is ADO (as in this example) or DAO.
For DAO recodsets, I receive a different error.

Nov 13 '05 #2
Actually, it works here just fine for disconnected recordsets based on
stored procedures (Access 2002 and 2003, ADO 2.7 and 2.8, SQL Server 2000
SP3a). I would make sure that the CursorLocation property of the recordset
is set to adUseClient and that its ActiveConnectio n property is set to
Nothing before binding the recordset to the form. Setting the UniqueTable
property of the form to any non zero-length string makes the underlying
disconnected recordset updatable, if that is needed.

The only issue I saw with this technique so far is that Access raised an
untrappable error "Data Provider could not be initialized" when removing
filter/sort via Access UI, but that can be worked around in the ApplyFilter
event, by cancelling the filter and re-binding the original unfiltered
recordset to the form.

On Jul 12 2004, 12:24 pm, "Michael \(michka\) Kaplan [MS]"
<mi*****@online .microsoft.com> wrote in news:40******** @news.microsoft .com:
You can't, sorry. :-(

"Patrick Gonzalez" <pa************ **@oomc.com> wrote in message
news:f3******** *************** **@posting.goog le.com...
Is it possible to use the built-in filter functions (ie. "Filter by
Selection", etc..) when a form's recordsource has been set to a
recordset object during the load event. When I try to do this, I
receive the message "Cannot apply filter on one or more fields
specified in the filter property".

here is the code for the recordset creation:

Set conn = New ADODB.Connectio n
Set rsSQL = New ADODB.Recordset
gstrSQL = "SELECT CheckList.* " & _
"FROM CheckList " & _
"ORDER BY CheckList.RunDa te DESC ,
CheckList.LoanN umber;"
rsSQL.Open gstrSQL, conn, adOpenStatic, adLockReadOnly
Set Me.frmCheckList .Form.Recordset = rsSQL

It doesn't matter if the recordset is ADO (as in this example) or DAO.
For DAO recodsets, I receive a different error.


--
remove a 9 to reply by email
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2272
by: JimmyT | last post by:
I just configured and installed 2.3.4 and noticed there is no datetime module. I noticed there is a datetimemodule.c file that did not get built (ie no object file). Is there something I need to do to my system to make this module? Thanks, Jim
1
3118
by: Alex Elbert | last post by:
Hi I have built dynamic HTMLTable. Now I want to attach it directly to the Email Body - it is already built, so why not to use a ready table. However, I cannot find the way of getting plain HTML text out of dynamically built control. I tried to put my table between div and read div.innerHTML then - HTTP exception has been thrown. Any thoughts, ladies and gentelmen
0
2191
by: Andrew Crook | last post by:
does MYSQL have a quota built into it! I need it limit the size of each database AndiC
1
1890
by: Mark | last post by:
Is there a way to execute a statement that is built dynamically by a .NET application. For example I have a loop that is reading values from a database and I want to do something like the following. Dim stringa as string = "response.write somavalue" Execute(stringa) I realize this is not the best way to do this but it is
4
6588
by: Yasutaka Ito | last post by:
Hi, Is there a way to determine which version of .NET Framework any given assembly is built with? thanks! -Yasutaka
1
2107
by: William | last post by:
Looking for a pre built dotnet corporate or small business website template.
1
2183
by: William | last post by:
Looking for a pre built dot net website for consulting business. I am trying to put up a quick business web for a dot net frame work. I have a provider already. I am trying to save time. Any ideas will be appreciated. I will look at anything that can be modified VS 2003.
1
1548
by: Daniel | last post by:
is there any way to get to a unique build verion of an assembly at runtime? e.g. a version that is unique to the time that the assembly was built?
0
1438
by: anthony Lichnewsky | last post by:
Hi, I have here a huge bunch of cygwin-built dlls using heavily posix api calls, and I wanted to know how to link them to some VC .NET library wrapper (using microsoft C runtime libraries this time) so that they could be used on the .NET platform. I would like to be able to do both explicit and implicit linking. Could anyone please tell me how to do that, if it happens to be possible ?
48
4956
by: meyer | last post by:
Hi everyone, which compiler will Python 2.5 on Windows (Intel) be built with? I notice that Python 2.4 apparently has been built with the VS2003 toolkit compiler, and I read a post from Scott David Daniels where he said that probably the VS2003 toolkit will be used for Python 2.5 again. However, even before the release of Python 2.5, I cannot seem to find many retailers around here that still carry Visual Studio 2003, and some were a...
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10208
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9857
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7404
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3952
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3558
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2812
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.