In addition to Sandra's comments about error, another benefit to opening in design view versus normal view is that, since you won't be polling any data, it should save significant amounts of time in larger databases since it's not trying to load thousands of records your not even using.
Good point, Donald. Opening the object in Design View means Access doesn't have to load its underlying recordset, so that can make a noticeable difference when scanning large forms or reports tied to big tables or complex queries.
For this utility, we only need the object's Controls collection and its code module. There is no reason to open thousands of records just to see whether a button still exists. That's a nice little performance bonus, especially for a Scan All operation.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Developer 61.