A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

recordsetclone filter



 
 
Thread Tools Display Modes
  #1  
Old August 19th, 2004, 12:37 AM
dp
external usenet poster
 
Posts: n/a
Default recordsetclone filter

Hi everyone,

I am having a strange problem with trying pass a filter to a recordsetclone
Here is my code::::

Dim invDetailRS As ADODB.Recordset

Dim rsClone As Recordset
Set rsClone = frm.RecordsetClone
rsClone.Filter = "TO_INVOICE = -1 "

it seems to ignore any filter I pass to it.

Anybody tried this before?
Thanks,David

  #2  
Old August 19th, 2004, 03:50 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

By definition, the form's RecordsetClone set is just a copy of the records
in the form, why not apply the filter directly to the form:
frm.Filter = "TO_INVOICE = -1"
frm.FilterOn = True

Depending on the data source for the form, you may also find that the form's
RecordsetClone is actually a DAO recordset, in which case assigning it to an
ADO recordset is not likely to work.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"dp" wrote in message
...
Hi everyone,

I am having a strange problem with trying pass a filter to a
recordsetclone
Here is my code::::

Dim invDetailRS As ADODB.Recordset

Dim rsClone As Recordset
Set rsClone = frm.RecordsetClone
rsClone.Filter = "TO_INVOICE = -1 "

it seems to ignore any filter I pass to it.

Anybody tried this before?
Thanks,David



  #3  
Old August 19th, 2004, 02:01 PM
dp
external usenet poster
 
Posts: n/a
Default

Thanks for your reply, that worked perfectly.

I still don't really have a good reference to what objects are ADODB and
what are DAO. Is there a good reference out there?

Thanks,
David

"Allen Browne" wrote:

By definition, the form's RecordsetClone set is just a copy of the records
in the form, why not apply the filter directly to the form:
frm.Filter = "TO_INVOICE = -1"
frm.FilterOn = True

Depending on the data source for the form, you may also find that the form's
RecordsetClone is actually a DAO recordset, in which case assigning it to an
ADO recordset is not likely to work.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"dp" wrote in message
...
Hi everyone,

I am having a strange problem with trying pass a filter to a
recordsetclone
Here is my code::::

Dim invDetailRS As ADODB.Recordset

Dim rsClone As Recordset
Set rsClone = frm.RecordsetClone
rsClone.Filter = "TO_INVOICE = -1 "

it seems to ignore any filter I pass to it.

Anybody tried this before?
Thanks,David




  #4  
Old August 19th, 2004, 02:32 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default

DAO (Data Access Objects) is the native library, designed for MS Access.

When you create tables in Access, it uses DAO to create them.
When you create tables in Access, it uses DAO.
When you open a form into an Access table, is uses a DAO recordset.
When you write code that opens recordsets using Access tables, it makes
sense to use DAO.

If you use other data sources such as SQL Server, or Internet based
connections where you need disconnected recordsets, you might consider ADO.

This article provides an overview of the objects in the DAO tree, and how to
use them:
http://members.iinet.net.au/~allenbrowne/ser-04.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"dp" wrote in message
...
Thanks for your reply, that worked perfectly.

I still don't really have a good reference to what objects are ADODB and
what are DAO. Is there a good reference out there?

Thanks,
David

"Allen Browne" wrote:

By definition, the form's RecordsetClone set is just a copy of the
records
in the form, why not apply the filter directly to the form:
frm.Filter = "TO_INVOICE = -1"
frm.FilterOn = True

Depending on the data source for the form, you may also find that the
form's
RecordsetClone is actually a DAO recordset, in which case assigning it to
an
ADO recordset is not likely to work.


"dp" wrote in message
...
Hi everyone,

I am having a strange problem with trying pass a filter to a
recordsetclone
Here is my code::::

Dim invDetailRS As ADODB.Recordset

Dim rsClone As Recordset
Set rsClone = frm.RecordsetClone
rsClone.Filter = "TO_INVOICE = -1 "

it seems to ignore any filter I pass to it.

Anybody tried this before?
Thanks,David



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter - Advanced Filter? carrera New Users 4 August 13th, 2004 09:33 PM
Bug: print preview in form datasheet with server filter on crashes access (ADP A2002 SP3) Eric Cárdenas [MSFT] Using Forms 4 June 24th, 2004 08:38 AM
Filter Button Antonio General Discussion 4 June 16th, 2004 05:21 AM
Determining whther the user is setting or removing the filter... Brad Pears Setting Up & Running Reports 1 June 9th, 2004 04:29 PM
Please help! Displaying only rows with empty cells in a numeric field using Advanced Filter. Thanks JOCA New Users 1 June 5th, 2004 02:37 AM


All times are GMT +1. The time now is 01:48 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.