ms access - VBA LIKE operator with string -


i have code:

private sub item_afterupdate() me.sapp.form.recordsource = "select * application item = '" & me.item.value & "';" end sub 

now , works filters sapp (a subform) base on value in combobox item. wanna similar not equal like. , like:

private sub item_afterupdate() me.sapp.form.recordsource = "select * application item '" & me.item.value & "';" end sub 

i tried :

'% me.item.value %'  '% '" & me.item.value & "' %'  '% s %' (dim s string ; s = me.item.value) 

none of solutions works , idea on how fix this?

use * wildcard in msaccess, in other dbs it's %.

ref: https://msdn.microsoft.com/en-us/library/bb208897(v=office.12).aspx


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -