简体   繁体   中英

Why do I get a type mismatch error comparing two strings

Into a macro I inserted for if criteria the following condition:

[Forms]![NavigationForm]![NavigationSubform].[Report]![Field]<>"Empty" 

Note That [Field] is set to short text and default value ="Empty"

The rezult is that when I run the macro I get the type mismatch error.

Have you tried using the StrComp() function? Here's the documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM