How to se filter or recordsource

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • johnhawk
    New Member
    • May 2010
    • 4

    #1

    How to se filter or recordsource

    I populate many of my MS Access forms with only one record from a single table. Is it faster/better to use a SQL statement (with appropriate WHERE statement) applied directly to the recordsource or point the recordsource to the appropriate table and set the filter each time the form opens? Does the version (2003 vs. 2007) or the use of a SQL back-end make a difference?
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32669

    #2
    I don't believe there is ever much of a performance difference between the two approaches. I'd always recommend the full table with a filter though, for flexibility as well as ease of maintenance.

    Welcome to Bytes!

    Comment

    • johnhawk
      New Member
      • May 2010
      • 4

      #3
      Thanks

      Thanks; I was under the impression that the recordsource approach would be processed by the server and the filter would be processed by the client? Hence, the former approach would limit network traffic??

      Comment

      • Jim Doherty
        Recognized Expert Contributor
        • Aug 2007
        • 897

        #4
        Originally posted by johnhawk
        Thanks; I was under the impression that the recordsource approach would be processed by the server and the filter would be processed by the client? Hence, the former approach would limit network traffic??
        How many times do we see
        "Select * from the largest table in the universe" across the network and filter it when it gets to the client
        as opposed to
        "Select only the columns you need and the number of rows that you can define as needing from the largest table in the universe where my criteria equals an indexed column"

        For the most part with small stuff you don't notice much difference :)

        Comment

        • johnhawk
          New Member
          • May 2010
          • 4

          #5
          Originally posted by johnhawk
          I populate many of my MS Access forms with only one record from a single table. Is it faster/better to use a SQL statement (with appropriate WHERE statement) applied directly to the recordsource or point the recordsource to the appropriate table and set the filter each time the form opens? Does the version (2003 vs. 2007) or the use of a SQL back-end make a difference?
          Thanks for the quick reply.

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32669

            #6
            Originally posted by johnhawk
            johnhawk: Thanks; I was under the impression that the recordsource approach would be processed by the server and the filter would be processed by the client? Hence, the former approach would limit network traffic??
            Just to be clear - that is not what is going on here with filtered forms. It's all handled by the SQL engine.

            Comment

            • johnhawk
              New Member
              • May 2010
              • 4

              #7
              Originally posted by NeoPa
              Just to be clear - that is not what is going on here with filtered forms. It's all handled by the SQL engine.
              Thanks, again. Makes sense.

              Comment

              Working...