ACC97: Toggling Visible Property Makes Calendar Control Smaller

Last reviewed: May 14, 1997
Article ID: Q164096
The information in this article applies to:
  • Microsoft Access 97

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you toggle the Visible property of a Calendar control on a form from True to False and then back to True again, the control gets smaller on the form. It continues to shrink as you continue to toggle its Visible property.

CAUSE

The BorderStyle property of the Calendar control is set to something other than Transparent.

RESOLUTION

Set the BorderStyle property of the Calendar control to Transparent. Then if you want a border around the Calendar control, drag a Rectangle control around the Calendar control, and set the BorderStyle of the rectangle to the desired effect.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 97. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Problem

  1. Start Microsoft Access and open the sample database Northwind.mdb.

  2. Create a new form not based on any table or query in Design view:

          Form: ShrinkCalendar
          -----------------------------
          Caption: Calendar Form
    

          Calendar control 8.0:
    
             Name: axCalendar
             BorderStyle: Solid
          Command button:
             Name: cmdToggle
             Caption: Toggle Calendar
             OnClick: [Event Procedure]
    
    

  3. Type the following procedure in the OnClick property of the cmdToggle command button:

          Private Sub cmdToggle_Click()
    
             Me!axCalendar.Visible = Not Me!axCalendar.Visible
          End Sub
    
    

  4. Save the ShrinkCalendar form and switch to Form view.

  5. Click the Toggle Calendar button repeatedly. Note that as the Calendar control disappears and reappears again, it becomes smaller. The effect is most noticeable if you click the command button 30-50 times.

    NOTE: If you close and reopen the form containing the Calendar control, the control expands to its original size.


Additional query words: ODE custom
Keywords : IntpCstm kbusage
Version : 97
Platform : WINDOWS
Hardware : x86
Issue type : kbbug
Resolution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.