Data Entry Using Unbound Forms

DALIEN51

Registered User.
Local time
Today, 21:40
Joined
Feb 26, 2004
Messages
77
Hi All!

I have written a call log system in Access 97 for a busy customer help desk. Now I never bind any of my forms as I like to use VBA code to verify the entry first before writing it to the table. However, every now and then that million to one shot occasion occurs where 2 help desk operators click "close call" on the form simultaneously and therefore one of them gets a debug error (ie the system is busy).

So to prevent this error I have included a "on error" statement within my code which utilises the "RESUME" command to go back to the top of my procedure (in effect trying again). Now I have coded this on error trap to present the user with a message box along the lines of "system busy click OK to retry" as I was unsure about just leaving the code to continually loop until succesful? Is my uncaertainty justified or can I just leave the code to keep looping until it carries out a successful write to the table? This would be preferable as really I dont want the user to even be aware as if they are presented with this message too many times they might start getting worried!!!

My final question is should I send the code back to a point preceding the "On Error" statement at the top or does the system still remember this and so I can send it to a point after this? This is only a issue as I can envisage a time when by the time the system has re-tried another user is also writing a record and so the "on error" (or system busy) may be triggered again.

Any help most appreciated.

Dalien51
 
You could check TIMER and wait (loop) uselessly for say 1/4 or 1/2 a second before retrying. You could setup a timer event on your form and enable it for say 1/2 a second also, but then you would loose your hourglass and they may think they can do other things.
 
This is not an answer but...

If you were using a bound form you could easily use the forms BeforeUpdate event to process all your data verifications. You can use the cancel command to stop the user from writing the data to the table if they do not meet your programmed requirements. The Jet engine will prevent two users from writing to the same record at the same time.

I trust that your db is split? If not, it should be.
 

Users who are viewing this thread

Back
Top Bottom