?
Solved

Calender on form

Posted on 2002-07-22
13
Medium Priority
?
545 Views
Last Modified: 2010-05-18
I have a button on a form that opens a calender. But the date on the calender does not change. In other words, it does not display the current date, month and year. Below are my codes

Private Sub Cal_Click()
    Forms("frmReject").[Date Released].Value = Cal.Value
    Cal.Value = Date
    DoCmd.Close
End Sub

Private Sub Cal_Click()
    DoCmd.OpenForm "calender"
    Close
End Sub


Thanks for the help

0
Comment
Question by:fuad2
  • 5
  • 3
  • 2
  • +3
13 Comments
 

Expert Comment

by:wilmet
ID: 7169992
If your using the Microsoft Activex Control acxCalendar try setting the following property in the OnLoad event of your Form "calendar"

Private Sub Form_Load
0
 

Expert Comment

by:wilmet
ID: 7169993
If your using the Microsoft Activex Control acxCalendar try setting the following property in the OnLoad event of your Form "calendar"

Private Sub Form_Load
0
 

Expert Comment

by:wilmet
ID: 7169997
Sorry about the duplicate comments...

If your using the Microsoft Activex Control acxCalendar try setting the following property in the OnLoad event of your Form "calendar"

Private Sub Form_Load
   me.acxCalendar.Value = Date
End Sub


Bill
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:fuad2
ID: 7170053
Hi Bill

Yes I am using Microsoft Activex Control. When I added the property on the Onload event, I got error message, "Compiler error, can't find project or library"

thanks

Fuad2
0
 

Expert Comment

by:wilmet
ID: 7170081
Fuad2

Make sure that you have a reference set for MIcrosoft Calendar Control 9.0

While viewing the module code for your "calendar" form Select the "Tools' menu item, select "References', then scroll the list and select the checkbox next to "Microsoft Calendar Control 9.0'

Bill
0
 
LVL 2

Expert Comment

by:Yoink
ID: 7170099
You may have to register your calendar control.  
Locate mscal.ocx on your hardrive.  (Mine lives in:  C:\WINNT\system32)

Then, from a module, click <Tools><Active X Controls>.  Next, click register, and scroll to the location of mscal.ocx.

Also, use the code Bill posted.

HTH,

JK
0
 
LVL 2

Expert Comment

by:Yoink
ID: 7170102
You were too fast for me, Bill!
0
 
LVL 1

Expert Comment

by:fouchev
ID: 7170112
Hallo there,



I use the following


Private Sub Form_Load()

     YourCalenderName = now()

End Sub

This will hightlight the current date as per your PC system time.

Cheers


Fouche
0
 

Author Comment

by:fuad2
ID: 7170334
I checked the Reference and the system does not have Microsoft Calendar control 9.0, only 8.0

Thanks

Fuad
0
 

Expert Comment

by:wilmet
ID: 7170347
Checking 8.0 should do the trick.  

Calendar Control 8.0 is installed by Access 97 (Access Ver 8.0).

Calendar Control 9.0 is installed by Access 2000 (Access Ver 9.0)

Have you been able to pass the value of the control back to your original form (frmReject)?

Bill
0
 

Author Comment

by:fuad2
ID: 7170478
Hi Bill

We are using Access 97. If you don't mind I will email you the zip file.

Fuad
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7281551

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 

Accepted Solution

by:
ComTech earned 0 total points
ID: 7315434
This question will be placed in PAQ and points refunded.

Best regards,
ComTech
Community Support
Administrator @ EE
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question