John Fitz
jonper at oceanfree.net
Sun Nov 9 18:40:49 CST 2003
John, Try setting the detail section Visible property to No, the border property to none and the navigation buttons to no. Then use your code to reset these propeties as you wish. The fom will open invisible. John Fitz. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of John Colby Sent: 10 November 2003 00:07 To: Access Developers discussion and problem solving Subject: RE: [AccessD] A2K - setting a form invisible on open I certainly can't have a timer going all of the time. However I could have a hidden form that the timer is turned on by demand. A form opening that needs to be invisible puts it's name in a variable (or in a collection) The code that does that could start the timer and set the time to 250 ms or something. The form put's it's name in a collection and closes. The form's timer then starts, which reads the form(s) out of the collection and opens them invisible. What a &^%$ing kludge! Wouldn't it be nice if Access just worked? John W. Colby www.colbyconsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Dan Waters Sent: Sunday, November 09, 2003 9:40 AM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] A2K - setting a form invisible on open John, I also manage control formatting on forms based on user authorities, which come from a table. These authorities also determine who is authorized to open a form, and the authorities are changed from time to time by a manager at the company. A wild thought - Could your form have a timer event with a check on the user's authorities? If they are not authorized, then the form's visible property could be reset to me.visible = false. I guess you'd have to use some fraction of a second as the timer frequency. Maybe if a non-authorized user viewing a form is an infrequent event this could work. I guess if the event could use local information this might be useful. But if this is off the wall, just sweep it up! Best of Luck, Dan Waters -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby Sent: Saturday, November 08, 2003 8:44 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] A2K - setting a form invisible on open Dan, I appreciate this. Unfortunately this doesn't really solve my problem. I am designing a LightWeight Security system. The system is designed to control access to forms and controls such that a designer enters data in tables that define who can see / open forms etc. This means that I don't control the properties of a form at run time. It isn't my database. My wizard has to be able to take ANY form and open it invisible. Further, if a form attempts to unhide, my wizard code has to determine if the current user is allowed to unhide it, and if not then prevent the unhide. John W. Colby www.colbyconsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Dan Waters Sent: Saturday, November 08, 2003 3:12 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] A2K - setting a form invisible on open John, I have a startup form with quite a bit of startup code behind it. To make it invisible, I go to the database window, right-click the form, then select properties. Then check the Hidden checkbox. Now the form will never display, but all the code behind the form runs from the form's Open event. The form also closes itself after it does all it's things and opens the switchboard form. For you to be able to see and select the form from the list in the database window, go to Tools|Options, then select the View tab and check the Show Hidden Objects checkbox. Now, when the form list is displayed in the database window, the startup form's small icon will be 'grayed out' to indicate that this form is hidden. As long as your users can't muck around in Tool|Options and can't open the database window, this may work for you. HTH! Dan Waters Quality Process Solutions -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby Sent: Saturday, November 08, 2003 10:11 AM To: AccessD Subject: [AccessD] A2K - setting a form invisible on open I have a form I want to open invisible every time it opens, regardless of how it is opened. I placed me.visible = false in OnOpen. That doesn't work! The strange part is that if I place a breakpoint on the line and stop execution on the me.visible = false, then continue, the form correctly hides itself. Has anyone ever seen such a strangeness? John W. Colby www.colbyconsulting.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