If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Calendar Option with Date and Time
I want to setup the calendar pop-up option to enter dates on a form. The
calendar works fine, but I need it to also enter time along wit the dates. In the table I have the date to display along with the time but when you choose the date from the calendar option it only shows the date not the time. I went into the table and it is only showing the date. I need the time it is entered because i have a report calculating the date and time difference. |
#2
|
|||
|
|||
Calendar Option with Date and Time
Hi
I think the reason for this is that the calender control is not really meant for selecting Now() but rather past or previous dates - there are much better ways of selecting today's date. You could just use the Now() function OnClick, AfterUpdate, OnLoad, etc, etc or anywhere else that you want to record the time/date of an event - I would not use the calender control for this. If you have a control called txtTimeDate you could have something like Private Sub ButtonName_Click() Me.txtTimeDate = Now() End Sub to give you the time date to store in your table HtH -- Wayne Manchester, England. "Alaska1" wrote: I want to setup the calendar pop-up option to enter dates on a form. The calendar works fine, but I need it to also enter time along wit the dates. In the table I have the date to display along with the time but when you choose the date from the calendar option it only shows the date not the time. I went into the table and it is only showing the date. I need the time it is entered because i have a report calculating the date and time difference. |
#3
|
|||
|
|||
Calendar Option with Date and Time
Thank you for your response. I will keep that in mind. The problem for me
is the date will not always be the current date. Some of the dates will have to be put in from past dates. "Wayne-I-M" wrote: Hi I think the reason for this is that the calender control is not really meant for selecting Now() but rather past or previous dates - there are much better ways of selecting today's date. You could just use the Now() function OnClick, AfterUpdate, OnLoad, etc, etc or anywhere else that you want to record the time/date of an event - I would not use the calender control for this. If you have a control called txtTimeDate you could have something like Private Sub ButtonName_Click() Me.txtTimeDate = Now() End Sub to give you the time date to store in your table HtH -- Wayne Manchester, England. "Alaska1" wrote: I want to setup the calendar pop-up option to enter dates on a form. The calendar works fine, but I need it to also enter time along wit the dates. In the table I have the date to display along with the time but when you choose the date from the calendar option it only shows the date not the time. I went into the table and it is only showing the date. I need the time it is entered because i have a report calculating the date and time difference. |
#4
|
|||
|
|||
Calendar Option with Date and Time
I always like to "try" (not always possible) and keep the number of fields in
a table down to the minimum required. But you could (if you really want to keep using the calendar control) have a clock on the form as well and store the time in a seperate field or (better) use 2 unbound boxes on your form to collect date and time and then combine them before you store them in a date/time field in your table. I have just tried to gain a time stamp (not date) from a calendar control and couldn't do it. Mabe there is a way that don't know of and someone else will answer with the method. But if it's not possible then you should just add a date and time into 2 boxes (unbound) then combine them into the correct format for a date/time field in your table You could make it very simple for users to orperate by placing 2 buttons on the form Use the time now Use another date time OnClick the 2 button would open the calendar and a clock - select these to add the data Hope this helps -- Wayne Manchester, England. "Alaska1" wrote: Thank you for your response. I will keep that in mind. The problem for me is the date will not always be the current date. Some of the dates will have to be put in from past dates. "Wayne-I-M" wrote: Hi I think the reason for this is that the calender control is not really meant for selecting Now() but rather past or previous dates - there are much better ways of selecting today's date. You could just use the Now() function OnClick, AfterUpdate, OnLoad, etc, etc or anywhere else that you want to record the time/date of an event - I would not use the calender control for this. If you have a control called txtTimeDate you could have something like Private Sub ButtonName_Click() Me.txtTimeDate = Now() End Sub to give you the time date to store in your table HtH -- Wayne Manchester, England. "Alaska1" wrote: I want to setup the calendar pop-up option to enter dates on a form. The calendar works fine, but I need it to also enter time along wit the dates. In the table I have the date to display along with the time but when you choose the date from the calendar option it only shows the date not the time. I went into the table and it is only showing the date. I need the time it is entered because i have a report calculating the date and time difference. |
Thread Tools | |
Display Modes | |
|
|