G
Guest
Hi. Sorry if this post is a bit long…
I seem to have run into a bug in Access 2002, in the SizeToFit method
(important to the front end of the application I am developing). I initially
assumed the bug was in my application, but after I created a separate
stripped down mdb for testing purposes, I found I repeatedly get the results
described below. I found nothing relevant after extensive searching on the
net (unless of course I was asking the wrong question).
When SizeToFit is called 16,366 times (in my case) on a label control, the
following symptoms occur:
SizeToFit stops working immediately. If I try to open a form, table, query
or report manually from the database window, in any view, nothing happens.
Macros, modules and data access page design DO open and appear to behave
normally, but if I run code that attempts to open a form, error 3011 occurs
(...couldn't find the object ''…). Note: the object name in the error message
IS actually blank. Application files do not open, and new databases cannot be
created.
Everything’s fine once I quit Access and go back in.
I found that if 'Size > To Fit' is invoked repeatedly from the menubar using
SendKeys, no such problem occurred (this is of no use to me, but I thought it
may be worth noting).
I also found the same symptoms occurred with repeated OpenForm operations
(either form view or design view), after about 10,000 cycles. When the same
process was invoked using SendKeys instead, the number of successful cycles
actually halved to around 5,000. In these cases of course, because they were
inherently opening and closing a form, they terminated with the error
described above.
I did read somewhere that repeatedly opening and closing forms could cause
data corruption but apart from that, I have found nothing relating the the
above problem.
I have tested the problem on another machine, with the same results.
Admittedly the other machine in question is very similar to my own, so I
don’t know for sure that the problem isn’t somehow related to the setup we
have here…
Because the problem is quite predictable, I have been able to code a warning
message into my application, advising the user to restart the application
‘soon’ once it counts a certain number of SizeToFit operations, but this is
isn’t really satisfactory.
All the above problems are cumulative, i.e. interrupting the code does not
reset the ‘counter’, so to speak, and I haven’t found a way of doing so.
I have installed Office XP service pack 3, the latest Jet service pack, and
am running Windows 2000.
If anyone knows what is causing this and/or can suggest a solution or
workaround I would be very grateful. Thanks
I seem to have run into a bug in Access 2002, in the SizeToFit method
(important to the front end of the application I am developing). I initially
assumed the bug was in my application, but after I created a separate
stripped down mdb for testing purposes, I found I repeatedly get the results
described below. I found nothing relevant after extensive searching on the
net (unless of course I was asking the wrong question).
When SizeToFit is called 16,366 times (in my case) on a label control, the
following symptoms occur:
SizeToFit stops working immediately. If I try to open a form, table, query
or report manually from the database window, in any view, nothing happens.
Macros, modules and data access page design DO open and appear to behave
normally, but if I run code that attempts to open a form, error 3011 occurs
(...couldn't find the object ''…). Note: the object name in the error message
IS actually blank. Application files do not open, and new databases cannot be
created.
Everything’s fine once I quit Access and go back in.
I found that if 'Size > To Fit' is invoked repeatedly from the menubar using
SendKeys, no such problem occurred (this is of no use to me, but I thought it
may be worth noting).
I also found the same symptoms occurred with repeated OpenForm operations
(either form view or design view), after about 10,000 cycles. When the same
process was invoked using SendKeys instead, the number of successful cycles
actually halved to around 5,000. In these cases of course, because they were
inherently opening and closing a form, they terminated with the error
described above.
I did read somewhere that repeatedly opening and closing forms could cause
data corruption but apart from that, I have found nothing relating the the
above problem.
I have tested the problem on another machine, with the same results.
Admittedly the other machine in question is very similar to my own, so I
don’t know for sure that the problem isn’t somehow related to the setup we
have here…
Because the problem is quite predictable, I have been able to code a warning
message into my application, advising the user to restart the application
‘soon’ once it counts a certain number of SizeToFit operations, but this is
isn’t really satisfactory.
All the above problems are cumulative, i.e. interrupting the code does not
reset the ‘counter’, so to speak, and I haven’t found a way of doing so.
I have installed Office XP service pack 3, the latest Jet service pack, and
am running Windows 2000.
If anyone knows what is causing this and/or can suggest a solution or
workaround I would be very grateful. Thanks