I won't discuss the EOF/BOF thing, as Iburyak has dealt with that. As for the rest...
I think you need to pinpoint why the name doesn't match. In this
- rsc.Open "select * from products where product_name='" & product_name & "'", strDSN, 3, 1
-
override = rsc("override")
you need to investigate where (or
whether) the variable
product_name was populated, and why it doesn't match what you expected to find in field
[products].[product_name].
If you find that it
does appear to match, consider the possibility that the match
might be case-sensitive. (I'm not at all certain that is even possible, though).
Also, if I might be permitted a personal observation, I think it is unnecessarily confusing to use identical names for database fields and variables in this way (Eg. product_name). :) I realise you're just trying to take over someone else's unfinished code, but I think that's worth keeping in mind.
And one last point. When posting code, please put
[C O D E] and
[/ C O D E ] tags around it. (Remember to leave out the spaces I embedded in the tags here, and do a "Preview Post" before submitting, to see whether it worked.)