The data-type mismatch error is indicative that you provided something to Access in a way that makes it see it in one format whereas what you needed was another format. First, recognize that Access VBA has knowledge of the data type of something, but the SQL portion DOES NOT SEE the information about data types. SQL runs in a separate environment and does what it does only when passed an SQL string. To SQL, this is a numeric comparison:
WHERE X = 1
- but if X was actually stored as the (text) digit "1" for some reason, that is a case of error 3464 not merely looking for, but FINDING a place to happen.
The solution is that you have to convert the number to text, such as the CStr() function, or you have to convert the text to a number, such as the Val() or CLng() function.
WHERE X = CStr(1)
or
WHERE VAL(X) = 1
Obviously, if you are getting the numeric comparand from some other place, the problem will still be to convert one or the other of the comparands (but not both). That way you can get an apples-to-apples comparison.
As it actually appears, your problem is the reverse of what I posted, which doesn't invalidate what I posted. Your clause:
[acccount name] = ‘“ & ![account name] & “‘
leaves the blue part numeric (you said in post 23 it is a number data type) but the red part is clearly text because of those surrounding quotes.