Speeding up a table update

A

Alex

**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...
 
A

Arvin Meyer [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top