Me![HangingOnEndgeOfBlackHoleThisWillBecome].Hands = 2
I wasn't going to get into this discussion at first, but I found some free time.....
I am going to start by saying, that there is a time and place for almost every object in Access. Queries can be useful, if the query is static and does not change. Macros have their place, again if their is not much of a change in the macro. Navigation buttons make sense if you want to walk through the records one by one.
But let's imagine a query that is flexible.....for example, you have a national sales database. You want to be able to display in a report all the sales you have made in fifeteen states. So you build yourself a query. Now, you need to be able to display a report of thirty other states....another query is needed,or you have to modify the existing one.....Using one list box, a SQL statement, and a for each statment, you can have a flexible report, that will display only the selected states, from 1 to 50, in the list box.
-------------------------------------------
Now let's imagine a large database (thousands of records). You have a request to be able to jump ten or maybe fifty records ahead of current with a navigation button. Nav buttons like:
-100 -50 -10 -1 +1 +10 +50 +100
Creating your own buttons through VBA, and using the .Move property of a recordset, you can easily accomplish this.
------------------------------------------
Next let's take comments.......can you place comments in a query??? On a property sheet??? No! So what happens when in two years (average time on job in the IT world), you leave the company and someone else takes over your database??? Or worse, you get hired to fill the job of the guy who just left??? With the all query method, you are in a world of hurt to take over and figure what is going on. A properly developed database suing VBA code for most of its function will include a large amount of comment lines....and the comment lines should be in plain english (or appropriate language) that any joe schmoe off the street can read it and know what the next lines of code will do. I write my comments as if my boss, a non-Access programmer, needs to be able to understand them.
-----------------------------------------------
Size is an issue of warrant. Every object, like a query and a macro, may not seem like much individually, but when you have hundreds to view through and maintain, they take up screen space and MBs too.....
-------------------------------------------------
Finally, security.......
First, the fewer static objects in the database, the easier user-level security through an .mdw file is to maintain....you have fewer object to assign permissions (or forget) to. And if you create a .mde file......all you "code" is completely locked out....users (and potential competitors) have absolutely no access to the procedures of your database.....I can open a .mde file that is all queries and such, and figure out exactly what is going on.....if there is mostly VBA modules and functions....I ain't getting into em....
-------------------------------------------------
These are just a few examples.......I gonna grip the the side of the blackhole again and watch from the rim.....
Me![HangingOnEndgeOfBlackHoleThisWillBecome].Hands = 2 Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need!
Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com