A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Speeding up a table update



 
 
Thread Tools Display Modes
  #1  
Old March 17th, 2010, 01:32 PM posted to microsoft.public.access
Alex
external usenet poster
 
Posts: 1
Default Speeding up a table update

**newb alert**

I have a rather basic form, 14 input fields, and about 20 fields total
that are used to add items to a table. I inherited this beasty from an
old schooler, and have really no idea where to start speeding this
form up. It takes on average, 1min47sec to update 1 item.

I was poking around in the code for the add button, which does the
actual updating to the table. Its got a bunch of dim's at the
beginning of the function obviously, and I'm wondering if it would be
possible to move these...

'[Add part] button
Dim rs As Recordset
Dim rs1 As Recordset
Dim db As Database
Dim PrevItem As Integer
Dim sSQL As String
Dim sSQL1 As String

Dim Counter As Integer
Me.Refresh

From the button itself to the function that loads the actual form
itself... essentially turn it from a run every time its clicked, to
run once when the form loads, and just add some wiping mechanisms to
the end of the function to clean them out and get ready for the next
item...

Any suggestions are appreciated, I am not sure if this is even
feasible...
  #2  
Old March 17th, 2010, 02:46 PM posted to microsoft.public.access
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default Speeding up a table update

There are lots of reasons for poor performance. I expect your problem has
nothing at all to do with the database unless you are running it over a slow
dialup on the Internet. The code below doesn't make much sense as is, since
it doesn't do anything except refresh the form. I'd check your network
first.

Here are a number of performance tips on the Access side:

http://www.granite.ab.ca/access/performancefaq.htm
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


"Alex" wrote in message
...
**newb alert**

I have a rather basic form, 14 input fields, and about 20 fields total
that are used to add items to a table. I inherited this beasty from an
old schooler, and have really no idea where to start speeding this
form up. It takes on average, 1min47sec to update 1 item.

I was poking around in the code for the add button, which does the
actual updating to the table. Its got a bunch of dim's at the
beginning of the function obviously, and I'm wondering if it would be
possible to move these...

'[Add part] button
Dim rs As Recordset
Dim rs1 As Recordset
Dim db As Database
Dim PrevItem As Integer
Dim sSQL As String
Dim sSQL1 As String

Dim Counter As Integer
Me.Refresh

From the button itself to the function that loads the actual form
itself... essentially turn it from a run every time its clicked, to
run once when the form loads, and just add some wiping mechanisms to
the end of the function to clean them out and get ready for the next
item...

Any suggestions are appreciated, I am not sure if this is even
feasible...



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:27 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.