Monday, March 05, 2007

And another thing

I seem to have been doing a lot of complaining lately but that's probably because I've been trying to get some work done.

When I was slightly less wise I was stupid enough to develop a couple of applications using Access. But developing things is not so much of a career as a sentence and my once happily working Access database was presumably missing me and decided to throw random errors on just one customer machine.

Anyway, 3 weeks later and more diagnostic code than you can shake several sticks at I tracked it down (cornered it more like) to a Timer event than runs every two hours. Once the event has run, subsequent code fails on a random basis on a subform with Error 91. And just to make life interesting you could only trap the error with a form level error handler.

As we can't reproduce the error, I thought I would try and fool it and rewrote the timer event so it was doing more or less the same thing but in a different way. Unfortunately we now get the same error but also in a slightly different way.

Along the way I discovered some other interesting foilbles like trying to a access a control on a subform when the parent form is minimised doesn't work no matter what syntax you use. Error 2455 in case you are interested.

Searching the internet showed an interesting catalogue of Access woes but predictably I seemed to have scored another world first. (funny how often that happens).

So the upshot is we have turned off the timer for that machine, end of problem, except of course several weeks of time spent trying to fix the problem which we won't be getting paid for.

VB6 sir, that'll do nicely.

2 comments:

Ant said...

I stumbled across your post... and as I use Access quite regularly
I quickly slapped together a Access 2K DB to test your claim of not being able to access a subform control when the parent form is minimized.

It worked for me using either the two main/different reference methods which I called from a command button on different form that was configured as a dialog, popup & modal.

Happy to supply you the code if you still care! Gathering you are probably over it though. :)

For DB front ends, I still prefer Access over VB6 where suitable.

Steve Blencowe said...

Thanks Ant.

I guess it's possible that the form was corrupt (or I was doing something wrong!) but the error was 100% consistent. If the form was displayed, no error. Minimise, get the error. I resolved the problem by forcing the form to be displayed before the code referred to the subform control.

Be interested to see your code sample

Steve Blencowe