Solved

Calender on form

Posted on 2002-07-22
13
504 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

827 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