Avatar of ljcor
Flag for United States of America

asked on 

VB6 - Error 13 Type Mismatch baffles me this time

This code gets an Error 13 Type Mismatch on the last line of code shown below.

The immediate window shows "ssql" as:
   SELECT tblEvalSupp.* From tblEvalSupp WHERE tblEvalSupp.ItemID = 1143

What does it not like?  I just can't figure it out.  I hope you can help.
Public Sub CheckOffOption(Index As Integer)
    Dim ssql As String, msg As String, ProjSelected As Long, rsf As Recordset
    ProjSelected = frmDataSelection!lngSelected
    ssql = "SELECT tblEvalSupp.* From tblEvalSupp "
    ssql = ssql & "WHERE tblEvalSupp.ItemID = " & ProjSelected
    Set rsf = db.OpenRecordset(ssql)

Open in new window

Visual Basic Classic

Avatar of undefined
Last Comment

8/22/2022 - Mon