472,801 Members | 1,185 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,801 software developers and data experts.

Calendar error

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 assist with this.
Thanks in advance.

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 combo box on the form and have bound the control to
the Date Reported field. I have placed the calendar control on the
form and set the Visible property to no.
The following code has bee added to the Mouse Down Event of the Date
Reported combo box.
Private Sub Date_Reported_MouseDown(Button As Integer, Shift As
Integer, X As Single, Y As Single)
' show calendar and set date
Calendar.Visible = True
Calendar.SetFocus
End Sub
The folowing code has been added to the Click event for the calendar
control.
Private Sub Calendar_Click()
' Set Date reported to selected date and hide calendar
Date_Reported.Value = Calendar.Value
Date_Reported.SetFocus
Calendar.Visible = False
End Sub
When i go back to the form and click on the combo box control i
receive an error stating. "The value you have entered isn't valid for
this field." This is displayed twice before showing the calendar. I
am
able to clcik on a date in the calendar and it si then displayed int
he combo box control.
I am at a loss to fix this.
Please advise.
Thanks
Karl

May 17 '07 #1
3 2638
On 17 May 2007 00:51:53 -0700, "th****@gmail.com" <th****@gmail.com>
wrote:

I have a hard time following your logic - perhaps that's why you're
not getting many responses.
You have a combobox that you want to put a date in using a calendar
control??? Then you fiddle with the MouseDown event, ignoring the fact
that people can interact with a dropdown using the keyboard only (e.g.
Alt+CurDown)???

DateReported should probably be a textbox, bound to the DateReported
field in the underlying table or query. If you want to help the user
with a calendar control (you don't mention which one - every one is
different), you actually need to know how to write some code to show
that calendar (perhaps in a modal form) and upon selection put the
value in the desired textbox.

One alternative is to use the "Microsoft Date and Time Picker
Control". You can find it in your toolbox under ActiveX controls. No
programming needed, just put it in the place of the DateReported
textbox.

-Tom.

>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 assist with this.
Thanks in advance.

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 combo box on the form and have bound the control to
the Date Reported field. I have placed the calendar control on the
form and set the Visible property to no.
The following code has bee added to the Mouse Down Event of the Date
Reported combo box.
Private Sub Date_Reported_MouseDown(Button As Integer, Shift As
Integer, X As Single, Y As Single)
' show calendar and set date
Calendar.Visible = True
Calendar.SetFocus
End Sub
The folowing code has been added to the Click event for the calendar
control.
Private Sub Calendar_Click()
' Set Date reported to selected date and hide calendar
Date_Reported.Value = Calendar.Value
Date_Reported.SetFocus
Calendar.Visible = False
End Sub
When i go back to the form and click on the combo box control i
receive an error stating. "The value you have entered isn't valid for
this field." This is displayed twice before showing the calendar. I
am
able to clcik on a date in the calendar and it si then displayed int
he combo box control.
I am at a loss to fix this.
Please advise.
Thanks
Karl
May 18 '07 #2
On May 18, 12:31 am, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
On 17 May 2007 00:51:53 -0700, "tho...@gmail.com" <tho...@gmail.com>
wrote:

I have a hard time following your logic - perhaps that's why you're
not getting many responses.
You have a combobox that you want to put a date in using a calendar
control??? Then you fiddle with the MouseDown event, ignoring the fact
that people can interact with a dropdown using the keyboard only (e.g.
Alt+CurDown)???

DateReported should probably be a textbox, bound to the DateReported
field in the underlying table or query. If you want to help the user
with a calendar control (you don't mention which one - every one is
different), you actually need to know how to write some code to show
that calendar (perhaps in a modal form) and upon selection put the
value in the desired textbox.

One alternative is to use the "Microsoft Date and Time Picker
Control". You can find it in your toolbox under ActiveX controls. No
programming needed, just put it in the place of the DateReported
textbox.

-Tom.
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 assist with this.
Thanks in advance.
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 combo box on the form and have bound the control to
the Date Reported field. I have placed the calendar control on the
form and set the Visible property to no.
The following code has bee added to the Mouse Down Event of the Date
Reported combo box.
Private Sub Date_Reported_MouseDown(Button As Integer, Shift As
Integer, X As Single, Y As Single)
' show calendar and set date
Calendar.Visible = True
Calendar.SetFocus
End Sub
The folowing code has been added to the Click event for the calendar
control.
Private Sub Calendar_Click()
' Set Date reported to selected date and hide calendar
Date_Reported.Value = Calendar.Value
Date_Reported.SetFocus
Calendar.Visible = False
End Sub
When i go back to the form and click on the combo box control i
receive an error stating. "The value you have entered isn't valid for
this field." This is displayed twice before showing the calendar. I
am
able to clcik on a date in the calendar and it si then displayed int
he combo box control.
I am at a loss to fix this.
Please advise.
Thanks
Karl- Hide quoted text -

- Show quoted text -
Thanks for the reply.

What i am trying to do is had a popup calendar appear when the date
control on a form is selected, then once a date is selected show that
date in the date field and close the calendar.

I have tried a few different ways i am am able to get the calendar to
appear and insert the selected date, then close the calendar. However
i recieve an error indicating that the value for the field is not
valid. when i click okay it closes the error message and everything is
okay.

May 21 '07 #3
On May 21, 4:01 pm, "tho...@gmail.com" <tho...@gmail.comwrote:
On May 18, 12:31 am, Tom van Stiphout <no.spam.tom7...@cox.netwrote:


On 17 May 2007 00:51:53 -0700, "tho...@gmail.com" <tho...@gmail.com>
wrote:
I have a hard time following your logic - perhaps that's why you're
not getting many responses.
You have a combobox that you want to put a date in using acalendar
control??? Then you fiddle with the MouseDown event, ignoring the fact
that people can interact with a dropdown using the keyboard only (e.g.
Alt+CurDown)???
DateReported should probably be a textbox, bound to the DateReported
field in the underlying table or query. If you want to help the user
with acalendarcontrol (you don't mention which one - every one is
different), you actually need to know how to write some code to show
thatcalendar(perhaps in a modal form) and upon selection put the
value in the desired textbox.
One alternative is to use the "Microsoft Date and Time Picker
Control". You can find it in your toolbox under ActiveX controls. No
programming needed, just put it in the place of the DateReported
textbox.
-Tom.
>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 assist with this.
>Thanks in advance.
>I have an access database that i have added a pop upcalendarto, the
>Table information for the Date Reported field is
>Date/Time
>format short date,
>input mask is 00/00/0000.
>i have created a combo box on the form and have bound the control to
>the Date Reported field. I have placed thecalendarcontrol on the
>form and set the Visible property to no.
The following code has bee added to the Mouse Down Event of the Date
>Reported combo box.
>Private Sub Date_Reported_MouseDown(Button As Integer, Shift As
>Integer, X As Single, Y As Single)
>' showcalendarand set date
>Calendar.Visible = True
>Calendar.SetFocus
>End Sub
>The folowing code has been added to the Click event for thecalendar
>control.
>Private Sub Calendar_Click()
>' Set Date reported to selected date and hidecalendar
>Date_Reported.Value =Calendar.Value
>Date_Reported.SetFocus
>Calendar.Visible = False
>End Sub
>When i go back to the form and click on the combo box control i
>receive an error stating. "The value you have entered isn't valid for
>this field." This is displayed twice before showing thecalendar. I
>am
>able to clcik on a date in thecalendarand it si then displayed int
>he combo box control.
>I am at a loss to fix this.
>Please advise.
>Thanks
>Karl- Hide quoted text -
- Show quoted text -

Thanks for the reply.

What i am trying to do is had a popupcalendarappear when the date
control on a form is selected, then once a date is selected show that
date in the date field and close thecalendar.

I have tried a few different ways i am am able to get thecalendarto
appear and insert the selected date, then close thecalendar. However
i recieve an error indicating that the value for the field is not
valid. when i click okay it closes the error message and everything is
okay.- Hide quoted text -

- Show quoted text -
I revisited my database and have been able to input a popup calendar
without the errors.

Thanks Karl

May 21 '07 #4

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

Similar topics

4
by: Mark A. Washburn | last post by:
The Julian Calendar, adopted in 46BC by Julius Caesar, adds one day every four years to correct for the fact that Earth's solar year is slightly more than 365 of Earth's daily rotations. ( 365.25...
7
by: Shuffs | last post by:
Could someone, anyone please tell me what I need to amend, to get this function to take Sunday as the first day of the week? I amended the Weekday parts to vbSunday (in my code, not the code...
1
by: jacob henson | last post by:
I have a user control with a calendar in it. when my main page load with the calendar in it. the page has a java script error. also if you try to use the calendar it give a java script error. ...
5
by: Ben | last post by:
I have a javascript code in the ASP.NET page. I want to access Calendar control that is inside ASP page and is "run at server". I try to use following code but it doesn't work. <script...
0
by: GV | last post by:
Hi all, New to developing in VS 2005 ASP 2.0 Trying to have a easy pop calender for a button on a web page. I keep getting a error message in IE6 that says: Line 69 Char 3 Error:...
0
by: jphelan | last post by:
After opening and clicking on the popup calendar command control button, "fdlgCal"; I click on a given date. The date is suppose to then appear in a date field next to the control. Instead, I get...
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...
0
by: mathewgk80 | last post by:
HI all, I am having popup calendar Javascript code. But i dont know how it is connecting to asp.net code.. I am using asp.net,c#.net and also using 3tier architecture with master page.... I...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 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: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 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: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
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=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.