Dim rs As DAO.Recordset
sSQL = "SELECT Stock, Scanned FROM Products&
WHERE ((([Stock])=Forms!Products![StockCode]))
And ((([Scanned])=Forms!Products![Scanned Information]));"
Set rs = CurrentDb.OpenRecordset(sSQL)
If rs.RecordCount = 0 Then
MsgBox "This is not correct"
Else
MsgBox "wooooo this works"
End If
I know my SQL query is wrong but I'm not sure how to structure it correctly and I keep getting errors. Am I suppose to break it up with more inverted commas and leave the Forms!Products![StockCode] outside the commas ?