Results 1 to 2 of 2

Thread: Data Type Mismatch problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Location
    Lewiston, Maine
    Posts
    128

    Data Type Mismatch problem

    I get a type mismatch with the sql statement below. I'm trying to select all of the records that match
    the ID number in another table called frmPeople.

    VB Code:
    1. Set adoPrimaryRS = New Recordset
    2.   adoPrimaryRS.Open "select Giveaway_Date,ID_Num,Item_Given from Item where ID_Num = '" & frmPeople.txtFields(1).Text & "'", db, adOpenStatic, adLockOptimistic
    Can anyone help!

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Data Type Mismatch problem

    Code:
    Set adoPrimaryRS = New Recordset
      adoPrimaryRS.Open "select Giveaway_Date,ID_Num,Item_Given from [Item] where ID_Num = '" & frmPeople.txtFields(1).Text & "'", db, adOpenStatic, adLockOptimistic
    Try that.

    Also, if ID_Num is numeric, remove the single quotes from around it.

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