 |
| Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

October 17th, 2003, 08:19 AM
|
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Do it from a machine that has only Access 2000 installed. That way it will open it in Access 2000. That is the easier thing to do.
Or go to tools, options, and on the advanced tab, on the default file format select Access 2000. (this will only work if you have 2002 installed). Change the default after you have completed the decompile.
Sal
|
|

October 17th, 2003, 10:12 AM
|
|
Registered User
|
|
Join Date: Oct 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sal, you've saved my life.
My forms open lickity split!
One more question though. As soon as I open my vbe editor window, my performance is still going down to 15% or so. (I have 256 mb of ram)
Does this happen to everyone? Do you have any other great ideas?
Thanks
Lisa:):D  :)  :D  :):D
|
|

October 17th, 2003, 10:32 AM
|
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
great!!!!!!!!
All of you. Keep this in mind. It is better to distribute the front end to your users pcs. When you do this, and the front end is compiled, and you do a compact and repair after every close of the front end, the app will run better. The development front end, that is the one that you work on on your local drive or shared network drive, that one, will always be larger because, yes, as soon as you open the vbe the file will no loger be compiled.
Remember to always backup religiously, both front end and back end on a network drive that is being backed up. Keep incremental backups (by date if possible) of all your stuff after every major change.
Lisa, now your performance should be faster than when you had macros. converting macros to vb made your file larger, but now it should be smaller than when you had the macros.
Sal
|
|

October 17th, 2003, 10:46 AM
|
|
Registered User
|
|
Join Date: Oct 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks again Sal.
And yes, I won't go back to macros - I know individual events do run faster with vbe than macros - and also in progression - I am a reformed macro queen. ;)
Users frustrated with the SSSLLLLOOOOOWWWWWW speed of your pride and joy can be very frustrating  - but I'm happy now! :D
Bye for now
Lisa 
|
|

October 17th, 2003, 12:22 PM
|
|
Authorized User
|
|
Join Date: Sep 2003
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hey Sal,
Thanks for the suggestions! As I was reading this thread, I came across the point that you guys were talking about how in access all the data is transferred then you retreive 3 rows for example, but in sql only those three rows are transferred.
But you also mentioned that, since I have my data on sql server then i wont be getting a lot of perfomance issues! Now what happens when I execute queries from access? does access still transfer all data and then execute or the other way around???
Sam Gharnagh
Jr. Programmer Analyst at MOH
Comp Sci at UofW
|
|

October 17th, 2003, 01:19 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
By creating a query inside of Access, you are bringing all data to the client pc each time a client requests data from that query. So if your table has 3,000,000 records and you aly need one and you use a query to filter, all 3,000,000 record will be brought to the client, then the client will decide which records to filter. This is what kills your database front end and your network.
If you are using three tables in your query, and Table1 has 3,000,000 records table2 has 2,000,000 and table3 has 1,000,000 Access will bring all 6,000,000 records to the client.
It gets worse when you are using the one I just mentioned as the source for another query, it gets UGLY.
Instead, use views to filter the data on SQL Server, and whenever possible, create stored procedures and use them with ADO code as the source for your reports.
So, even though you do not have performance issues right now, if you do that, your Access application will retrieve data almost instantly and your users will be happier.
Sal
|
|

October 20th, 2003, 12:12 PM
|
|
Authorized User
|
|
Join Date: Sep 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Sal,
I'm going through the decompile process and noticing that I have what appears to be som bad code in the DB.
The code all works fine, yet it doesn't seem to be able to compile. It seems to be favoring reports first so I can't actually run the compile on my forms yet.
The Crux of the problem.
When referencing items on the for do you surround the code in each sub or function CodeContextObject? And use the dot notation to reference each control?
An example to clarify
Sub Something()
With CodeContextObject
'Variables referrenced
.some_control.Value = .some_other_control.Value
.some_control.value = "this text"
.recalc
End with
End Sub
I have not been doing that for the majority of the code (and there is alot). My code lookes more like this
Sub Something()
'Variables referrenced
some_control.Value = some_other_control.Value
some_control.value = "this text"
Me.Recalc
End Sub
There also seems to be problems with the Me.Recalc instead it prefers just the .recalc. It doesn't let me compile from the point I want. Lets say I'm on a form and compile it always moves tho the reports first.
Does this mean all the code is incorrect? 
Thanks
-Roni
Roni Estein
[email protected]
https://www.e-drugsCanada.com
|
|

October 20th, 2003, 04:24 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The following is correct
Sub Something()
'Variables referrenced
some_control.Value = some_other_control.Value
some_control.value = "this text"
Me.Recalc
End Sub
however, you are setting the value of some_control twice?
if some_control is a form, use .recalc, The compiler may be expecting that syntax.
If some_control is not a form. me.recalc should work fine
Did this code work before? chances are, if it is not compiling, it was not working before, or it has never been called to use.
Does that make sense? Sometimes this is not so clear.
I have dat times where I coded something and did not finish, and, because of that, my file wopuld not compile. What I did is comment the code out (if not needed yet) and compile.
Sal
|
|

October 20th, 2003, 06:11 PM
|
|
Authorized User
|
|
Join Date: Sep 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Sal,
I wasn't assigning anything twice, I was just trying to give an example of the type of errors its been picking up. I'll definatly go through the entire code section tonight to see if it is just something that I have to comment out or fix.
As long as that method of doing things is proper it shouldn't be too hard. I know I've seen both methods in the books and when the decompile choked I went into a preliminary panic mode.
I also picked up the Professional SQL server 2000 programming by Robert Vierra. It seems to have some serious depth, so hopefully the transition to SQL server will be smooth. (Like that ever happens).
But I noticed earlier on the thread when you were discussing access v. SQL server calls. If you have a listbox or some device that has a built in rowsource, or a form that has backend query attached to it. Must hese things also be redone? Or when calling the SQL does SQL server only deliver what is needed?
-Roni
Roni Estein
[email protected]
https://www.e-drugsCanada.com
|
|

October 20th, 2003, 08:28 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Actually, I think that the transition to SQL Server can be smooth. You are willing to put the effort to learn, so I do not see why you would have much trouble.
for me the best source so far for information on SQL Server has been SQl Server Books Online. My favirite book for Transact SQL is The Guru's Guide to Transact SQL, by Ken Henderson. It covers enough material to keep you learning for a year.
Anyway, make sure to compile your database front end and you will see the speed you get.
Learn stored procedures and ADO (or ADO.NET), because once you have used them for complex reports that bring a lot of data, these are FAST. You will never do reports any other way once you get used to them.
Have fun.
Sal
|
|
 |