Click here to Skip to main content
15,890,609 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to choose data on date parameter from access database and for i that i wrote a code but it dose not works and do not shift control to next ,pleas help me

What I have tried:

VB
Private Sub GSTN_STRT_DT_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles GSTN_STRT_DT.Validating
        If GSTN_STRT_DT.Value > Date.Now Then
            MessageBox.Show("Date cannot be AFTER today.")
            e.Cancel = True
            'dteditsbdt
        Else
            GST_FORDATE.Focus()
            GST_FORDATE.Select() : Me.Show()
        End If
    End Sub
Posted
Updated 24-Oct-17 21:42pm
v2

1 solution

Have you tried debugging? Here is a guide to how to do that Mastering Debugging in Visual Studio 2010 - A Beginner's Guide[^]
Why redisplay the form (that is probably what is affecting your focus - try removing
: Me.Show()
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900