Re: How to shut off ALL Menus ?



ApexData@xxxxxxxxx wrote:
Thankyou for the response.
The suggestion of OnUnload or OnClose of the form does not work
for me, because my VARIABLES LOSE THEIR VALUES in those
states? These two publicly defined Variables get assigned in the
Module1 module and work perfectly throughout the app, but lose
their value without reason, in the unload of the form?

There is no specific reason for a public variable to lost its value in these
events. In an MDB though public variables can lose their value when an
unhandled error occurs. Many developers avoid this problem by using hidden
TextBoxes or TextBoxes on hidden forms instead of public variables.

Since you need a hidden form for its Close/Unload event then you have a
perfectly logical container for such TextBoxes.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


.



Relevant Pages

  • Re: Public variable named from field content
    ... The two down sides of using public variables are: ... to add the textboxes to my Splash form. ... store the variable name and value in a collection, ... textboxes (set the TabStop to False, and scrollbars set to none) in that ...
    (microsoft.public.access.formscoding)
  • Re: Page Break in Excel from VB 2005
    ... I'm going to start to move the public variables. ... The reason I did not have the spreadsheet visible is because this program is ... having invisible copies of excel running if the project errored out. ... programming) is that of encapsulation. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Page Break in Excel from VB 2005
    ... I'm going to start to move the public variables. ... The reason I did not have the spreadsheet visible is because this program is going to run a couple hundred times in a day and the time to open and close excel itself would be very time consuming. ... You mention a possible memory leak. ... The generate lines rountine has many sub routines. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Form level Public Variables
    ... > Public variables. ... Let|Set" as wrapper for the variables. ... One reason is that your form is totally unaware of changes made from ... > Now to me creating a form level variable that will accept an indicator as to ...
    (microsoft.public.vb.enterprise)
  • Re: Dim vs. Public
    ... "Jamie Collins" skrev i melding ... > As far as I know there is no good reason for using a Public variable; ... If you need to share a module-level ... I use public variables for things that are used ...
    (microsoft.public.excel.programming)