-
Oct 16th, 2000, 05:48 AM
#1
Thread Starter
Fanatic Member
Can anyone tell me what this is for? And how to use it? There seems to be no specific help for this on the MSDN cds...
-
Oct 16th, 2000, 07:43 AM
#2
Addicted Member
I don't know if you have ever worked with MS Access but if so you should be ashamed.
This filter option you are talking about is an extra SQL-command that is used to limit the number of record listed. In order to do this fast and to remove it fast, microsoft gave us this command.
You can use it with a recordset, but also with a database. When you do it with a database, then all recordsets based on this database-object has the same filter.
When you change the database-filter, all the recordsets that are refreshed then take the new database filter. Enebling you to change a numoures count of recordsets with a single change.
Catch you later,
Jeroen Hoekemeijer
Code:
If 1 = 2 Then MajorError
-
Oct 16th, 2000, 09:19 AM
#3
Thread Starter
Fanatic Member
Woah Jeroen!!! I've worked a little with Access, but I feel no shame...
Thing is, I do know what a filter is, and there is sample code in the MSDN, but only using created db objects, not ones drawn on a form. What I was really looking for was how to make this particular filter take effect.
So can you give me some sample code please?
-
Oct 16th, 2000, 10:06 AM
#4
Thread Starter
Fanatic Member
-
Oct 17th, 2000, 01:00 AM
#5
What is it you are trying to filter? Or what is it you want an example of? Be specific.
We'll hook you up.
-
Oct 17th, 2000, 03:07 AM
#6
Thread Starter
Fanatic Member
I just want to know how to apply a filter for a data object. I've tried stuff like 'Data1.Recordset.Filter = ' and all that, but it doesn't seem to affect anything. Is there something I need to do to get the filter to take effect or what? The only filter example in the help system applies to data objects created at runtime.
-
Oct 17th, 2000, 06:28 AM
#7
Thread Starter
Fanatic Member
Ed, I thought you were going to hook me up...
-
Nov 28th, 2000, 04:11 AM
#8
A Thousand Apologise (I think I spelled that wrong) Effendi
Lets say you have recordset with a FirstName field in the query and you want to limit it to just the first names that start with 'f' then
Code:
Data1.recordset.filter="FirstName Like f*"
Lets take the same example and say you want to also take only those with the LastName starting with 'Ma'
Code:
Data1.recordset.filter="FirstName Like f* And LastName Like Ma*"
Or if you want to filter by what a user has typed in a textbox
Code:
Data1.recordset.filter="Firstname='" & Text1.text & "'"
And to reset the filter back to none
Code:
Data1.recordset.filter=""
Sorry about the delay but better late then never
-
Nov 28th, 2000, 07:16 AM
#9
Thread Starter
Fanatic Member
Thanks mate, it was a long time coming!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|