LanaR
Member
- Local time
- Tomorrow, 06:15
- Joined
- May 20, 2021
- Messages
- 113
The following SQL is throwing a 3464 Run time error Data type mismatch in criteria expression
I'm referring to [Text12] in other SQL in other events, without issue. The only thing I can think of is that in this instance [Text12] is being populated by Left(OpenArgs, Len(OpenArgs) - 4) (yes [Text12] is holding the value I'm expecting) whilst in all other instance it is simply being populated by the raw OpenArgs. I can't for the life of me see where I've gone wrong
Code:
'SQL statment to delete exsiting record(s) relating to current wine
StrSQL = "DELETE TBL_WineGrape.WineID, TBL_WineGrape.WineGrapeID " & _
"FROM TBL_WineGrape " & _
"WHERE (((TBL_WineGrape.WineID)= '" & [Text12] & "'));"
I'm referring to [Text12] in other SQL in other events, without issue. The only thing I can think of is that in this instance [Text12] is being populated by Left(OpenArgs, Len(OpenArgs) - 4) (yes [Text12] is holding the value I'm expecting) whilst in all other instance it is simply being populated by the raw OpenArgs. I can't for the life of me see where I've gone wrong