472,119 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 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 1214
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Jure Erznoznik | last post: by
7 posts views Thread by Malcolm Webb | last post: by
8 posts views Thread by Alan Silver | last post: by
2 posts views Thread by flipdoubt | last post: by
3 posts views Thread by Nathan Sokalski | last post: by
reply views Thread by Armand | last post: by
reply views Thread by leo001 | last post: by

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.