Solved

Calender on form

Posted on 2002-07-22
13
528 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

688 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