473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Weird problem with DatePicker

Every time I jumped to a new month, the app kept popping up the message box
for subsequent months until 2050! If I stayed within the same month (current
month), it worked fine.
Please take a look at the following codes. Nothing special about it.
Please help!!

Bill

Private Sub dtPicker1_ValueChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles dPicker1.ValueChanged

If dPicker1.Value >= Today Then

Beep()

MsgBox("Invalid Sales date: " & dPicker1.Value & vbCrLf & _

"Please choose a valid Sales date.")

Exit Sub

Else

Call DoLoadCombo()
End If

End Sub
Nov 20 '05 #1
2 1262
Bill
Do you have more than one DateTimePicker?
I see your code has dtPicker1 and dPicker1?
---
Steve Stein -VB .NET Team
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "Bill Nguyen" <bi*****************@jaco.com>
| Subject: Weird problem with DatePicker
| Date: Mon, 3 May 2004 10:36:40 -0700
| Lines: 33
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| Message-ID: <#Y**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 66-162-157-205.gen.twtelecom.net 66.162.157.205
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP12
phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.languages.vb:200228
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Every time I jumped to a new month, the app kept popping up the message
box
| for subsequent months until 2050! If I stayed within the same month
(current
| month), it worked fine.
| Please take a look at the following codes. Nothing special about it.
| Please help!!
|
| Bill
|
| Private Sub dtPicker1_ValueChanged(ByVal sender As System.Object, ByVal e
As
| System.EventArgs) Handles dPicker1.ValueChanged
|
| If dPicker1.Value >= Today Then
|
| Beep()
|
| MsgBox("Invalid Sales date: " & dPicker1.Value & vbCrLf & _
|
| "Please choose a valid Sales date.")
|
| Exit Sub
|
| Else
|
| Call DoLoadCombo()
|
|
| End If
|
|
|
| End Sub
|
|
|

Nov 20 '05 #2
Steve;
Yes, but it's not the problem. There must be something else that caused the
looping. I had to set the maxdate value to the same month so that it won't
jump to subsequent months. This worked for me but I still cannot figure out
what wrong with the codes.
Thanks
Bill

""Steven Stein [MSFT]"" <ss****@online.microsoft.com> wrote in message
news:02*************@cpmsftngxa10.phx.gbl...
Bill
Do you have more than one DateTimePicker?
I see your code has dtPicker1 and dPicker1?
---
Steve Stein -VB .NET Team
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Bill Nguyen" <bi*****************@jaco.com>
| Subject: Weird problem with DatePicker
| Date: Mon, 3 May 2004 10:36:40 -0700
| Lines: 33
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| Message-ID: <#Y**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 66-162-157-205.gen.twtelecom.net 66.162.157.205
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP12 phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.languages.vb:200228
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Every time I jumped to a new month, the app kept popping up the message
box
| for subsequent months until 2050! If I stayed within the same month
(current
| month), it worked fine.
| Please take a look at the following codes. Nothing special about it.
| Please help!!
|
| Bill
|
| Private Sub dtPicker1_ValueChanged(ByVal sender As System.Object, ByVal e As
| System.EventArgs) Handles dPicker1.ValueChanged
|
| If dPicker1.Value >= Today Then
|
| Beep()
|
| MsgBox("Invalid Sales date: " & dPicker1.Value & vbCrLf & _
|
| "Please choose a valid Sales date.")
|
| Exit Sub
|
| Else
|
| Call DoLoadCombo()
|
|
| End If
|
|
|
| End Sub
|
|
|

Nov 20 '05 #3

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

Similar topics

6
by: Jure Erznoznik | last post by:
I just spent the whole day on solving this problem but still have no success. This is what i do: ModalDialog.window = window.open("", "error", "toolbar=no,width=" + iWidth + ",height=" +...
7
by: Malcolm Webb | last post by:
I use the Microsoft Access Calendar (ActiveX) to pass dates into queries and reports. I have recently come across the Microsoft Access DatePicker developed by Brendan Kidwell and I now use this...
8
by: Alan Silver | last post by:
Hello, I'm trying to write a simple user control as an exercise (and 'cos it might be useful). I am trying to do a simple date picker, which consists of three drop down lists, one for the day,...
2
by: flipdoubt | last post by:
What do most people use for a DatePicker and is a DatePicker included in ASP.NET 2.0? I've seen some of the commercial products out there, but the redistributable license for most of them is too...
3
by: Nathan Sokalski | last post by:
I am working on a simple user control composed of 3 DropDownLists that will be used to select Dates. The purpose of the control is to all the user to choose a date using dropdown lists but not need...
2
by: Pipo | last post by:
Nobody knows how to get the values provided in the client can be read in the user-control? If have made a Web Custom Control with 2 textboxes and 1 dropdownlist. The user fills in my control (the...
0
by: Armand | last post by:
Hi All, is anyone of you have any good resource about implementing datepicker that is binded into asp:textbox control? I do have a client side datepicker in JS, but it is binded to html input...
8
by: shaielinna | last post by:
<? ob_start(); session_start(); require('../includes/inc.php'); require('../includes/settings.php'); include("../includes/dbconnect.php");?> <?php // requires the class require...
6
by: ichibon | last post by:
Hi, I have trouble setting the position of the DatePicker, a control from WPF Toolket June 2009 release. When click on the DatePicker control, the Calendar always open as a drop down and expands...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.