Solved LikeNot in multiple criteria in Dcount

zelarra821

Registered User.
Local time
Today, 17:42
Joined
Jan 14, 2019
Messages
850
Hi. I am trying to make this formula work in an Access report, but it gives me an error. Could you tell me where the fault is? I know it is from [PorQueAñadoEsteLibro].

=DCont("*";"[TLibros]";"[Comprado]=" & Verdadero & " And " & "[Estado]=" & 3 & " And " & "[Libreria]=" & 2 & " And " & "[PorQueAñadoEsteLibro]" & "NotLike" & "*" & "Kindle Unlimited" & "*")

Thanks.
 
No, keep failing
 
try dcount rather than dcont

also seem to be missing some single quotes and you can also simplify your code a bit

=DCount("*";"[TLibros]";"[Comprado]=" & Verdadero & " And [Estado]= 3 And [Libreria]= 2 And [PorQueAñadoEsteLibro] Not Like '*Kindle Unlimited*'")
 
Why are you bothering to concatenate literal strings and numbers?
 
I added a bit more to my post - take another look re single quotes
 

Users who are viewing this thread

Back
Top Bottom