VBA Editor Data Type Mismatch

I keep getting "data type mismatch" when it runs in Access 2007,

I looked at him for a while and cannot understand.

Private Sub Combo7_AfterUpdate()
    Dim clString As Integer
    clString = Me![Combo7].Value
    strSQL = "SELECT [Categorized Tables].[Name of Table] " & _
             "INTO [catTemp] " & _
             "FROM [Categorized Tables] " & _
             "WHERE [Categorized Tables].[Category] = " & clString
    DoCmd.SetWarnings False
    DoCmd.RunSQL strSQL
    DoCmd.SetWarnings True
End Sub

The debugger points to the strSQL DoCmd.RunSQL string.

Does anyone have an idea on where I am going wrong?

+3
source share
1 answer

The answer to this question is Siddharth Rout:

"Try it clString = Val(Me![Combo7].Value)"

0
source

All Articles