472,983 Members | 2,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,983 software developers and data experts.

Calendar Control

I cant seem to set the date on the calendar control. What i want to
happen is have a form pop up when a button is clicked (have that part of
course). This for has a calendar control on it. I have the code to
pass the date selected back to the original form working just fine. I
want to have the calendar start with whatever the current date is as the
selected date -or- a specificed date passed to the form (by a global
variable) based on a condition. I know how to test the condition with
an IF loop. I just can't seem to set the date on the calandar control
when the form opens. Any help please?
Nov 12 '05 #1
2 1728
Ima Lostsoul <me@myprovider.com> wrote in message news:<MP************************@netnews.comcast.n et>...
I cant seem to set the date on the calendar control. What i want to
happen is have a form pop up when a button is clicked (have that part of
course). This for has a calendar control on it. I have the code to
pass the date selected back to the original form working just fine. I
want to have the calendar start with whatever the current date is as the
selected date -or- a specificed date passed to the form (by a global
variable) based on a condition. I know how to test the condition with
an IF loop. I just can't seem to set the date on the calandar control
when the form opens. Any help please?

In the On Open event of your calendar control put this code.

Private Sub SelectDate_Open(Cancel As Integer)
Forms!frmYourFormName!CalendarControlName.Value = Date
End Sub

This will open the calendar control with the current date. I think you
will find that the calendar control does not have its own open event
procedure, so Just type the code in.

David
Nov 12 '05 #2
In article <MP************************@netnews.comcast.net> ,
me@myprovider.com says...
I cant seem to set the date on the calendar control. What i want to
happen is have a form pop up when a button is clicked (have that part of
course). This for has a calendar control on it. I have the code to
pass the date selected back to the original form working just fine. I
want to have the calendar start with whatever the current date is as the
selected date -or- a specificed date passed to the form (by a global
variable) based on a condition. I know how to test the condition with
an IF loop. I just can't seem to set the date on the calandar control
when the form opens. Any help please?

Never mind. I was being stupid...
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tim Graichen | last post by:
Hello, I am making use of the Active X calendar control (mscal.Calendar.7) in several places in my main form, with the following code Below is an example of the code I'm using for the...
5
by: Miguel Dias Moura | last post by:
Hello, i am trying to create a .css file with several styles and apply them to the calendar control so i can change the look of: 1. Text Type and Format (Bold, Underline, etc) 2. Background...
1
by: bill yeager | last post by:
I would like to place the currently selected date (retrieved from the database) on a calendar control which is embedded inside a datagrid. However, I can't find the ID of the control to do so....
0
by: maxrawson | last post by:
First, let me start by saying my asp.net experience is still in it's infancy so please bare with me as I try to explain my situation. I have created a single page that with the use of many...
2
by: Caesar Augustus | last post by:
First, let me start by saying my asp.net experience is still in it's infancy so please bare with me as I try to explain my situation. I have created a single page that with the use of many...
3
by: Peter | last post by:
Is there anyway to make the System.Web.UI.WebControls.Calendar to display only Month Name and Year, like: January, 2006 February, 2006 ..... .... .... ....
3
by: =?Utf-8?B?UGFycm90?= | last post by:
I applied the following Ajax code in my web page which has a calendar control to keep my page from completely reloading everytime something was changed. <atlas:ScriptManager ID="ScriptManager1"...
7
by: John Kotuby | last post by:
Hi all, I am trying to use a calendar server control which I have ID="Calendar1" in the source code. What I am trying to do is emulate a JavaScript calendar that was being used in an older ASP...
6
by: thorpk | last post by:
I have an access database that i have added a pop up calendar to, the Table information for the Date Reported field is Date/Time format short date, input mask is 00/00/0000. i have created a...
3
by: thorpk | last post by:
I posted this problem earlier in the month and some one decided it was better to change the subject and ask a completely different question. I am therefore reposting. I am hoping some one can...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.