>Hilmar,
>Will try it out.
>However, if we use the other options, the problem will also arise where users input "[" into the string..
>Yau
The three kinds of quotation marks are for constants. For variables, you don't need any quotation marks.
UserString = alltrim(ThisForm.TxtUserOption1.Value)
SQLCommand = ... + UserString + ...
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)