0
votes

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.

1
I don't have a lot of experince with reports in VBA, but could you be missing a property of [Field]? Maybe [Field].Value or [Field].Text - Michael Z.
Default Acces is .Value. Tried the .text thow. Didn't work! Same error. - Dragos Florin Gogu
The macro stops at first row (if) when it wants to setlocalvar *L0 value to the true/false response variable. Seems like the *L0 needs one type of variable and (this is the odd part) if() / strcomp() doesn't supplies it (although it should). - Dragos Florin Gogu
I bypassed the problem by using a form instead of a report. It seems that the report field gives a wrong form of short text. - Dragos Florin Gogu

1 Answers