Solved

Calender on form

Posted on 2002-07-22
13
473 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:fuad2
Comment Utility
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
Comment Utility
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
Comment Utility
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 2

Expert Comment

by:Yoink
Comment Utility
You were too fast for me, Bill!
0
 
LVL 1

Expert Comment

by:fouchev
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility

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
Comment Utility
This question will be placed in PAQ and points refunded.

Best regards,
ComTech
Community Support
Administrator @ EE
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now