+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Sep 2004
    Posts
    275

    Search by Date -- VB.NET

     
    Code:
     Private Sub GetPO()
    
            Dim fromdate As Date
            fromdate = cboPOsearchTD.Text + "/" + cboPOsearchTM.Text + "/" + cboPOsearchTY.Text
            
    
            objDS.Clear()
            objDS = objUser.Search_tblUser("Select * from tbl_PURCHASE where Order_Date = 'fromdate'")
          
            Try
                dgPOSearch.DataSource = objDS.Tables(0)
            Catch ex As Exception
    
            End Try
    
        End Sub
    I've got a Format Error "Data Format mismatch "

    How Come ??

    The "Order_Date " is in Date/Time format in MS Access Database !!

    Please Help ! i've been stuck in this error for few weeks !!!

  2. #2
    Member
    Join Date
    Oct 2003
    Posts
    267
    I would try changing the data type in access to text. Ive had problems in the past similiar to your issue. When using vb as a front end its better to just validate everything in vb rather then the database side

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. get date in access
    By danlindley in forum Webmastering and Programming
    Replies: 2
    Last Post: August 9th, 2004, 04:26 PM
  2. reset search page to default
    By JacobM5727 in forum Technical Support
    Replies: 6
    Last Post: January 15th, 2004, 06:11 AM
  3. Digital Camera on RH9
    By Logic in forum Linux and Unix
    Replies: 9
    Last Post: December 5th, 2003, 07:37 AM
  4. MS Access Help with a Query
    By Marvinator in forum Applications and Operating Systems
    Replies: 2
    Last Post: December 2nd, 2003, 03:24 PM
  5. Date Notification
    By eastfield in forum Webmastering and Programming
    Replies: 8
    Last Post: January 22nd, 2003, 03:10 AM

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Recommended Sites: ResellerRatings Store Reviews