J
jeff moore
every thing works right up to the last statment, where i
get a "Data type mismatch in criteria expresion" error.
run time error 3464. I have all the nessecary dao libaries
enabled. the code is identical to code in a different
database that does run. the SQL query runs fine on its
own. the var prodcode = 11166 and the SQL statement
returns SYCAMORE. TIA Jeff
Dim db As Database
Dim SQL As String
Dim rs As Recordset
Set db = CurrentDb()
Dim Prodcode As String
Prodcode = Me![WFCProdCode].Text
MsgBox Prodcode
SQL = "SELECT [Product].[CustAbrev]FROM Product WHERE
((([Product].[ProdCode])='" & Me![WFCProdCode].Text
& "'));"
MsgBox SQL
Set rs = db.OpenRecordset(SQL)
get a "Data type mismatch in criteria expresion" error.
run time error 3464. I have all the nessecary dao libaries
enabled. the code is identical to code in a different
database that does run. the SQL query runs fine on its
own. the var prodcode = 11166 and the SQL statement
returns SYCAMORE. TIA Jeff
Dim db As Database
Dim SQL As String
Dim rs As Recordset
Set db = CurrentDb()
Dim Prodcode As String
Prodcode = Me![WFCProdCode].Text
MsgBox Prodcode
SQL = "SELECT [Product].[CustAbrev]FROM Product WHERE
((([Product].[ProdCode])='" & Me![WFCProdCode].Text
& "'));"
MsgBox SQL
Set rs = db.OpenRecordset(SQL)