Darryl Collins
Darryl.Collins at iag.com.au
Thu Jun 16 15:16:38 CDT 2011
_______________________________________________________________________________________ Note: This e-mail is subject to the disclaimer contained at the bottom of this message. _______________________________________________________________________________________ I have always found the effectiveness of application.echo (compared to Excel's application.screenupdating = false) to be fairly hit and miss. In Excel you tell the screen not to update and it doesn't move. In Access, I find application.echo works most/some of the time at best. maybe it is just me and I need to understand application.echo better. cheers Darryl. ________________________________________ From: accessd-bounces at databaseadvisors.com [accessd-bounces at databaseadvisors.com] On Behalf Of jm.hwsn [jm.hwsn at gmail.com] Sent: Friday, 17 June 2011 3:06 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Navigation pane I never tried that.... until now. ScreenUpdating is not available in Access. But... Echo is Using Docmd.Echo False before linking and DoCmd.Echo True after closing the window does work. Thanks, Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob Gajewski Sent: Thursday, June 16, 2011 11:49 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Navigation pane Jim Isn't there a way to turn off the screen refresh, execute your commands, then turn it back on? That would eliminate the 'flash' ... I know how to do it in Excel, but I've never tried it in Access. Application.ScreenUpdating = False ... Your code ... Application.ScreenUpdating = True Regards, Bob Gajewski -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jm.hwsn Sent: Thursday, June 16, 2011 11:41 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Navigation pane Yes, the navigation pane is visible and the user can access any object just as if it wasn't hidden at the beginning. What needs to be done is in code, set the focus to one of the objects in the navigation pane, then close the "active window" and reset focus back to the form. What I am currently using is directly after link: DoCmd.SelectObject acTable, "tblName", True ' the name of the table I just linked DoCmd.RunCommand acCmdWindowHide If one is paying close attention and looking for it there is slight flash of the navigation pane but for most users they don't see anything. Annoying but it works. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson (VBACreations.Com) Sent: Thursday, June 16, 2011 10:30 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Navigation pane Wow, that was REALLY outside the box thinking. Kudos. I feel I am hijacking Steve's thread on this follow-up question which actually has very little to do with hid modal form issue... I take it you are saying that transferdatabase does so and LEAVES it in that condition even after completing? Is the property something that can be read, stored, and reapplied with an "As You Were!" line of code, directly before and after using TransferDatabase? -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jm.hwsn Sent: Thursday, June 16, 2011 11:00 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Navigation pane Steve, Thank you for sharing this tip. This is very useful. If you are not aware, there is a bug in the TransferDatabase and possibly the TransferSpreadsheet methods in Access 2007. When using the DoCmd.TransferDatabase method to link to an external Access database file the navigation pane is exposed. Even if the "Display Navigation Pane" has been disabled. Microsoft knows about this bug and there doesn't seem to any fix nor is it on the list to be fixed at this moment. There are few things that can be done to work around the problem, but they are not ideal. By changing the offending form to modal and using a work around, one can be reasonably sure the user cannot get to the tables. Thanks again, Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Turner Sent: Thursday, June 16, 2011 8:50 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Navigation pane Hey William, got a reply from suzyQ on the MS forum about the form. It was set to Modal. Changed it to No and the form works as supposed to. Modal won't let another action happen till it's done. Just in case anyone else runs into this problem or needs to deactivate the Nav pane. 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 (VBACreations.Com) Sent: Wednesday, June 15, 2011 4:39 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Navigation pane Hey, if doing that brought a cessation of pain and suffering ... I'd sure declare victory and call it a day! Glad to hear. Thanks, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Turner Sent: Wednesday, June 15, 2011 4:44 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Navigation pane 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________________________________________________ The information transmitted in this message and its attachments (if any) is intended only for the person or entity to which it is addressed. The message may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information, by persons or entities other than the intended recipient is prohibited. If you have received this in error, please contact the sender and delete this e-mail and associated material from any computer. The intended recipient of this e-mail may only use, reproduce, disclose or distribute the information contained in this e-mail and any attached files, with the permission of the sender. This message has been scanned for viruses. _______________________________________________________________________________________