In the following code I would like to add a user input criteria expression selectible through a form combobox with three option to select from And/Or/Not
Like "*" & [Forms]![Test]![AbstractBox] & "*"
And Like "*" & [Forms]![Test]![AbstractBox2] & "*"
And Like "*" & [Forms]![Test]![AbstractBox3] & "*"
I have tried to do the following where I replace the And expression with the value of the combobox with the selectible options.
Like "*" & [Forms]![Test]![AbstractBox] & "*"
[Forms]![Test]![Criteriabox1] Like "*" & [Forms]![Test]![AbstractBox2] & "*"
[Forms]![Test]![Criteriabox2] Like "*" & [Forms]![Test]![AbstractBox3] & "*"
I get the following error:
Microsoft Office Access
The expression you have entered contains invalid syntax.
You may have entered an operand without an operator.
What should be the correct syntax to perform this option?
Like "*" & [Forms]![Test]![AbstractBox] & "*"
And Like "*" & [Forms]![Test]![AbstractBox2] & "*"
And Like "*" & [Forms]![Test]![AbstractBox3] & "*"
I have tried to do the following where I replace the And expression with the value of the combobox with the selectible options.
Like "*" & [Forms]![Test]![AbstractBox] & "*"
[Forms]![Test]![Criteriabox1] Like "*" & [Forms]![Test]![AbstractBox2] & "*"
[Forms]![Test]![Criteriabox2] Like "*" & [Forms]![Test]![AbstractBox3] & "*"
I get the following error:
Microsoft Office Access
The expression you have entered contains invalid syntax.
You may have entered an operand without an operator.
What should be the correct syntax to perform this option?