Insert Calendar Control Microsoft Office For Mac

brownnavi
5 min readMay 28, 2021

Download here

Jul 26, 2019 The following preferences can be used to simplify account setup for Office 365 mailboxes, help protect company data, and support a streamlined user experience. These keys are CFPreferences-compatible, which means that it can be set by using enterprise management software for Mac, such as.

Note

Office 365 ProPlus is being renamed to Microsoft 365 Apps for enterprise. For more information about this change, read this blog post.

Original KB number: 826761

Note

This article applies to a Microsoft Access database (.mdb) file or to a Microsoft Access database (.accdb) file. Requires basic macro, coding, and interoperability skills.

Symptoms

Purchase Microsoft Office For Mac

In Microsoft Access, an incorrect day is displayed for the first day of the Calendar Control. This problem occurs when you insert a Microsoft Calendar Control 10.0 or a later version into a form or into a report, and then you set the FirstDay property of the Calendar Control by using Microsoft Visual Basic for Applications (VBA) intrinsic constants.

Microsoft Word For Mac

For example, you set the FirstDay property of the Calendar Control to vbMonday or to vbTuesday. When you set the FirstDay property of the Calendar Control to vbTuesday, the calendar uses Wednesday as the first day of the week.

Note

When you use the earlier versions of Calendar Control, you can set the FirstDay property correctly.

Cause

This problem occurs because the intrinsic constants for the days that are defined in Microsoft Visual Basic, such as vbSunday and vbMonday, are not associated with the correct day value.

Workaround

To work around this problem, follow these steps:

  1. Determine the association between the days, the VBA intrinsic constants, and the numeric values that are associated to the correct day values and VBA intrinsic constants. To do this, follow these steps:
  2. Start Access.
  3. Open the Northwind sample database.
  4. In the Database window, click Forms under Objects.
  5. Note
  6. In Access 2007, click the Create tab, and then click Form Design in the Forms group.
  7. In the right pane, double-click Create form in Design view.
  8. On the Insert menu, click ActiveX Control.
  9. Note
  10. In Access 2007, click the Design tab, and then click Insert ActiveX Control in the Controls group.
  11. In the Insert ActiveX Control dialog box, click to select Calendar Control 10.0 or a later version from the Select an ActiveX Control list box, and then click OK.
  12. Add a command button to the form that has the properties set as follows:
  13. PropertyValueNametestFDCaptionChange First Day
  14. On the File menu, click Save.
  15. Note
  16. In Access 2007, click the Microsoft Office Button, and then click Save.
  17. In the Save As dialog box, type Form1 in the Form Name box, and then click OK to save the Form1 form.
  18. On the View menu, click Code.
  19. Note
  20. In Access 2007, click the Design tab, and then click View Code in the Tools group.
  21. In the Visual Basic Editor, type or paste the following code:
  22. Open Form1 in the Form view.
  23. Click the Change First Day button.
  24. Note
  25. If the first column of the Calendar Control is not set to Tuesday, note the day in the first column.
  26. In the Visual Basic Editor, click Immediate Window on the View menu.
  27. In the Immediate window, type ?vbTuesday, and then press ENTER.
  28. Notice the numeric value.
  29. Repeat step j through step o by replacing vbTuesday with other VBA intrinsic constants, such as vbMondayand vbWednesday.
  30. Notice that you will have the following table to show the association between the days, the VBA intrinsic constants, and the numeric values that are associated to the correct day values and VBA intrinsic constants.
  31. Week DayVBA Intrinsic ConstantNumeric Value AssociatedMondayvbSunday1TuesdayvbMonday2WednesdayvbTuesday3ThursdayvbWednesday4FridayvbThursday5SaturdayvbFriday6SundayvbSaturday7
  32. Create a global custom enumeration that is correctly mapped to the week days. To do this, follow these steps:
  33. In the Database window, click Module under Objects.
  34. Note
  35. In Access 2007, click the Create tab, click the arrow under Macro in the Other group, and then click Module.
  36. On the Insert menu, click Module.
  37. Type or paste the following code in the Visual Basic Editor:
  38. Note
  39. Create the enumeration as described in the ‘Week Day’ column and in the corresponding ‘Numeric Value Associated’ column of the table that is in step 1r.
  40. Name the Module Day_Association, and save it.
  41. Close the Visual Basic Editor.
  42. Replace the VBA intrinsic constants in your application with the constants that are in the custom enumeration that is described in step 2.
  43. For example, if your original code is
  44. modify your code to use custom enumeration as follows:
  45. Run the application.

More Information

The VBA intrinsic constants do not depend on the system local information. For example, on a computer that has the localized operating system in the German language, the first day of the week is Monday. The numeric value associated with Monday on the computer is always 0.

Because Calendar Control 10.0 or a later version is a worldwide Microsoft ActiveX control, you cannot control the numeric values that are associated with the VBA intrinsic constants based on your computer specifications. Therefore, the problem that is mentioned in the ‘Symptoms’ section of this article occurs.

Steps to reproduce the problem

  1. Start Access.
  2. Open the Northwind sample database.
  3. In the Database window, click Forms under Objects.
  4. Note
  5. In Access 2007, click the Create tab, and then click Form Design in the Forms group.
  6. In the right pane, double-click Create form in Design view.
  7. On the Insert menu, click ActiveX Control.
  8. Note
  9. In Access 2007, click the Design tab, and then click Insert ActiveX Control in the Controls group.
  10. In the Insert ActiveX Control dialog box, click to select Calendar Control 10.0 or a later version from the Select an ActiveX Control list box, and then click OK.
  11. Add a command button to the form that has the properties set as follows:
  12. PropertyValueNametestFDCaptionChange First Day
  13. On the View menu, click Code.
  14. Note
  15. In Access 2007, click the Design tab, and then click View Code in the Tools group.
  16. In the Visual Basic Editor, type or paste the following code:
  17. On the File menu, click Save.
  18. Note
  19. In Access 2007, click the Microsoft Office Button, and then click Save As. Is there a mac version of the microsoft whiteboard software.
  20. In the Save As dialog box, type Form1in the Form Name box, and then click OK to save the Form1 form.
  21. Open Form1 in the Form view.
  22. Click the Change First Day button.
  23. Although you set the FirstDay property of the Calendar Control to vbTuesday, the calendar selects Wednesday to be the first day of the week.

References

For more information about Calendar Control and the Calendar Control properties, open Mscal.hlp and then search for the appropriate topic. Mscal.hlp is located in the following folders:

Microsoft Access 2002

Installation Drive: Program FilesMicrosoft OfficeOffice10

Microsoft Office Access 2003

Installation Drive: Program FilesMicrosoft OfficeOffice11

Note

Installation Drive is a placeholder for the name of your installation drive.

Download here

--

--