Code Hiccups

LadyDi

Registered User.
Local time
Today, 10:13
Joined
Mar 29, 2007
Messages
894
I have recently built a database to automate the process of having technicians count their inventory. Data is pulled in via pass through queries and then manipulated in various ways depending on the button that is pressed and the destination of the information. The process goes something like this: 1. an associate in the corporate office electronically freezes the inventory for a technician. 2. The technician is notified that his inventory is frozen and is asked to count his parts. 3. The technician sends a list of his counts to the associate at corporate. 4. The associate at corporate enters the technician's counts into the computer system. 5. A report is run to show any differences between what the system said a tech had and what the tech said he had. 6. If there are differences, a report is sent to the tech asking that he recount certain parts. 7. Otherwise, if everything is okay, the associate at corporate unfreezes the tech's inventory.

In order to get the database to perform most of these steps, I put in a lot of VBA behind several different buttons. I am experiencing a couple issues. 1. The database is a little sluggish when a button is initially pressed (after it finishes the first step behind each button, it speeds up). Is there anyway to speed up the programming behind each button? The other problem I am seeing, is that sometimes, the database just seems to spontaneously skip steps. I have no idea why it would skip a step, it isn't giving any error messages, and if you just step through the code, it works fine. Do you have any ideas as to why this would happen, or how to prevent it from continuing to happen?

Right now, I am just having one associate test the database. I would like to get these problems solved before it gets pushed out to all the associates in that department. Any assistance you can provide would be greatly appreciated.
 
Have you followed through execution in debug mode?
 
I'm not sure I understand what you mean. Anytime I make a change to the code, I run the Compile command in the Debug menu. I have added breakpoints in the code and then stepped the whole way through it (it usually works when I do that).
 
I have added breakpoints in the code and then stepped the whole way through it).

That's precisely what I meant. :-)

Since you're not getting error messages, you need to figure out what's different about the times it's skipping steps. We would actually need to see code to have any idea at figuring out why it's executing slowly each time for the first step.
 
Here is the code that I have on my form (which is comprised of 12 buttons). Is there any way to improve this code?

Thank you so much for any assistance you can provide.
 

Attachments

I'll have to check it after work - can't download anything here.
 

Users who are viewing this thread

Back
Top Bottom