Steve Turner
sturner at mseco.com
Wed Jun 15 15:43:52 CDT 2011
William Thanks again for the reply. I made a new form copied all the buttons and code to it and it works like it should. GO Figure. I did have some test code for buttons that were not on the form that I did not copy but I can't see where that would cause it since it wasn't being called. Steve A. Turner Controller Mid-South Engineering Co. Inc E-Mail: sturner at mseco.com and saturner at mseco.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson Sent: Wednesday, June 15, 2011 12:48 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Navigation pane Steve, I assume no code like this is hiding the navigation pane: DoCmd.NavigateTo "acNavigationCategoryObjectType" DoCmd.RunCommand acCmdWindowHide Even so, that would hide the pane, not disable it Next, while the form is running and the navigation pane is present, try this *To enable an object, right-click the object, and then click Unhide in this Group . *To unhide a group, right-click the group, and then click Unhide . If that doesn't help, read further. I would work on a replica of the database, not the production version, while doing testing. I would also save what I am doing at intermediate steps, kind of like working your way through an old dungeons and dragons game and wanting to check out what's in that cavern over there without risk of final death! If you think it is a corrupt form or some issue with its controls or code: Have you tried building a fresh form in the designer and pasting all the controls and all the code from the old form to see if the problem persists? When you navigate (Activate) other forms, AFTER this form has loaded but BOTH WITH AND WITHOUT this one still in the background, is the Navigation Pane re-enabled? That would be really strange, right? Because even if there is some code running in the other form which has hooked and set the Navigation Pane in a certain manner, inadvertently, it's dubious that there is any code on OTHER forms which is setting it back. So if IT IS getting set back when navigating between forms, then I would think it really has to be a very bad form in the database. You mention things being made invisible and visible. Is there a chance you hooked the Navigation Pane in a For Each Loop while intending to make other objects invisible? I'd check there first. One sledge hammer approach would be (in a copy of the form) to search and replace the word INVISIBLE and make that VISIBLE -- which will interfere with your form greatly, but it is a temporary check ... rerun the form, and see if the problem is there. If so, then you know it is during one of those operations where your form is making something invisible, that the problem is occurring. Standard debugging steps from there on out... Rebuilding Forms: Code by Arvin Meyer, for saving forms and rebuilding from text http://tinyurl.com/3n7o7ge . Uses the undocumented SaveAsText and LoadFromText feature. modify code to rebuild a single form. Once the form is saved (SaveAsText), delete object, compact and repair, use LoadFromText to restore it. Compile. Selective replacement of objects: Make sure if the object is referred to in code or elsewhere, you change those references. This will help: http://tinyurl.com/3cwvuuk [WhereisObjectUsed.txt.] Most obvious Steps # 1: (1) try working with a copy of the problematic form - not likely to resolve anything but a quick sanity check. Most obvious Steps # 2: (2) try importing the same form from the backup (production) to this copy of the database (testing version) -- If the copy has the same issues it's worthwhile going further with testing. -- If not, I would simply kill the old form and continue with the replacement. OK, so it is still not resolved? (not surprised!) - Now test the old controls. (3) Using the copy you made in (1) or (2) above, Remove all controls, and any code behind the form which might refer to the controls. Launch form ... still have problem with Nagivation Pane? OK, so it is still not resolved? (not surprised!) - Now recreate the form. (4) Create a new form (no controls), Change Form properties to match the old form, Launch new form... OK, so it is still not resolved? (not surprised!) -Form Level Event Code only: (5) Add as much event code from the old form to the new form as you can, but comment out (or don't copy code which refers to controls, because you have not added any controls yet. Initially also comment out calls to functions and procedures (anything other than Form Event code), they will have to be tested one at a time. OK, so it is still not resolved? (not surprised!) - Other Functions and Procedures: (6) When it comes to testing procedures and functions, if they refer to objects on your form, Obviously they cannot be tested before you put the controls on the form. OK, so it is still not resolved? (not surprised!) - *COPIED* Form Controls: (7) Adding controls. As much as possible, try to copy the controls from the old form, first saving the form with a new name to try to catch some point when things head south. Using the old controls will preserve names and other properties, which can be a real pain in the ... uh, neck... to replicate entirely accurately. If you can add control one at a time and suddenly the problem shows up, then you get to keep all the other controls as they were copied. If you bothered getting this far, let me know where things stand after trying these steps. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com