Results 1 to 3 of 3

Thread: Search query of "DateTimePicker"

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2012
    Posts
    9

    Search query of "DateTimePicker"

    I have a field DateTimePicker in my database.
    I want to add a search query to search the date.

    When I use DateTimePicker1.text or .value it shows error.

    How I can build a DateTimePicker query?? Please help me.

    I'm using visual studio 2010.

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Search query of "DateTimePicker"

    well, w/o the code or the exact error message, we can't help much.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2012
    Posts
    9

    Re: Search query of "DateTimePicker"

    "Fail to convert parameter value from a String to DateTIme."

    this error shown when I run the program and perform a search query.

    The code is


    Private Sub btnSearchMeetingDate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearchMeetingDate.Click
    Try
    Me.ContactsTableAdapter.SearchMeetingDate(Me.Database1DataSet.Contacts, DateTimePicker1.Value & "%")
    Catch ex As System.Exception
    System.Windows.Forms.MessageBox.Show(ex.Message)
    End Try
    End Sub

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width