Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
String 如何在MS Access中使InStr案例敏感_String_Ms Access_Vba_String Comparison - Fatal编程技术网

String 如何在MS Access中使InStr案例敏感

String 如何在MS Access中使InStr案例敏感,string,ms-access,vba,string-comparison,String,Ms Access,Vba,String Comparison,如何在MS Access中使InStr区分大小写 我希望以下内容显示0 msgbox InStr("In Here", "here") 相反,我得到了4 我已尝试添加vbBinaryCompare msgbox InStr("In Here", "here", vbBinaryCompare) 但是它抱怨类型不匹配。使用InStrB而不是InStr。然后它将进行逐字节比较,而不是不区分大小写 msgbox InStrB("In Here", "here") 显示0帮助主题没有明确说明

如何在MS Access中使InStr区分大小写

我希望以下内容显示
0

 msgbox InStr("In Here", "here")
相反,我得到了
4

我已尝试添加vbBinaryCompare

 msgbox InStr("In Here", "here", vbBinaryCompare)

但是它抱怨类型不匹配。

使用
InStrB
而不是
InStr
。然后它将进行逐字节比较,而不是不区分大小写

 msgbox InStrB("In Here", "here")

显示
0

帮助主题没有明确说明这一点,但当使用可选的比较参数时,还需要提供可选的开始参数,以避免出现类型不匹配的投诉

因此,这将在
MsgBox
中显示0:

MsgBox InStr(1,"In Here", "here", vbBinaryCompare)