Microsoft KB Archive/164096

= ACC97: Toggling Visible Property Makes Calendar Control Smaller =

Article ID: 164096

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q164096



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



SYMPTOMS
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.



Steps to Reproduce Problem
 Start Microsoft Access and open the sample database Northwind.mdb.  Create the following 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]   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  Save the ShrinkCalendar form and switch to Form view.</li> 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 to 50 times.

NOTE: If you close and reopen the form containing the Calendar control, the control expands to its original size.</li></ol>

Additional query words: ODE custom

Keywords: kbbug KB164096

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.