Filter Vs. Recordsource

rob_levy

New member
Local time
Today, 17:55
Joined
Oct 16, 2007
Messages
7
Hi all,

Is there any difference between these two scenarios? Is one or the other better in any way?

Take a form bound to a table 'Customers'

1)
Open the form, set the recordsource to:
SELECT * FROM Customers WHERE Name = "Rob"

2)
Open the form, set the filter to:
Name = "Rob"

I'm assuming these two things are directly equivalent. Is this the case?

Thanks in advance,

Rob Levy
 
Yep,

RecordSource = total records shown

Filter = some of the total records shown

When you change the recordsource to include a where clause it is very hard (or impossible) for the end user to see the entire source.

When you change the filter, all the user has to do is switch it off to see everything.

The filter is an additional where clause.
 
recordsources are great for creating automation within your database. Say you have an excel file with a million records and you only wanted to import the names that match a set of names you had stored within a table then thats wat a recordsource is great for b/c you cant create a loop so that the recordsource cycles through the names within your Db table and import the specific files from the excel file. Where as a filter would be more useful on a query where you only wanted to see the people with the name 'Rob'..
 

Users who are viewing this thread

Back
Top Bottom