G
Guest
Is it possible to use "Like" instead of "=" in a parameters statement?
Instead of:
qdf2.Parameters("[Forms]![frmForm]![cboSite]") = [Forms]![frmForm]![cboSite]
Something like:
qdf2.Parameters("[Forms]![frmForm]![cboSite]") Like
[Forms]![frmForm]![cboSite]
I have a field on a form that is optional. If the user leaves it blank, then
I want all of the possible values to show. If the user enters a value, then
only show records with that value to show. Null keeps giving me the dreaded
Too Few Parameters error.
If I was using a SQL statement to do this, it would something like:
SELECT & FROM tblTest WHERE [Division] Like '*" &
[Forms]![frmForm]![cboSite] & "';"
Instead of:
qdf2.Parameters("[Forms]![frmForm]![cboSite]") = [Forms]![frmForm]![cboSite]
Something like:
qdf2.Parameters("[Forms]![frmForm]![cboSite]") Like
[Forms]![frmForm]![cboSite]
I have a field on a form that is optional. If the user leaves it blank, then
I want all of the possible values to show. If the user enters a value, then
only show records with that value to show. Null keeps giving me the dreaded
Too Few Parameters error.
If I was using a SQL statement to do this, it would something like:
SELECT & FROM tblTest WHERE [Division] Like '*" &
[Forms]![frmForm]![cboSite] & "';"