Microsoft KB Archive/125604

= ADT2: Cannot Edit Fields in Form with Calendar Control =

Article ID: 125604

Article Last Modified on 7/5/2002

-

APPLIES TO


 * Microsoft Access Developer's Toolkit 2.0

-



This article was previously published under Q125604



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



SYMPTOMS
When you select dates on your calendar custom control, the border around the selected dates alternates between a solid line and a faint dotted line. When the border is a faint dotted line, you cannot edit the fields on the form. (You may be able to delete characters, but you cannot add any).



CAUSE
This problem can occur if the calendar control is located in the form's header section.



RESOLUTION
Move the calendar control from the form's header section to the form's detail section.



STATUS
Microsoft has confirmed this to be a problem in Microsoft Access version 2.0. This problem no longer occurs in Microsoft Access for Windows 95 version 7.0.



Steps to Reproduce Problem
 Open the sample database NWIND.MDB. Create a blank new form based on the Orders table. From the Edit menu, choose Insert Object. In the Insert Object dialog box, select the Insert Control option button. In the Control Type box, select Calendar Control. Choose OK. Add the Order Date and Customer ID fields to the detail section.</li>  Set the calendar control's OnClick property to the following event procedure: Sub Embedded0_Click DoCmd ShowAllRecords DoCmd ApplyFilter, "[Order Date] < #" & [embedded0].object & "#" End Sub </li> View the form in Form view. Select various dates on the calendar. Note that you can edit the Customer ID field after you select each date.</li> View the form in Design view. From the Format menu, choose Form Header/Footer.</li> Move the calendar control to the form header section.</li> View the form in Form view. Select various dates on the calendar. Note that you can edit the Customer ID field only after every other date selection and that the border around the selected dates alternates between a solid line and a faint dotted line.</li></ol>

<div class="references_section">