M
Marc
WHERE in code to a query
I would like to avoid adding a form expression in a query
such as =[Forms]![PopUp_Export]![CboN]
I've been advised that this can be done entering the WHERE
restriction by code, which looks something like this:
dim strWhere as string
if isnull(cboSalesRep) = false then
strWhere = "SalesRep = '" & cboSalesRep & "'"
end if
But I don't know how to make the Query to execute this
WHERE condition without entering the whole query using sql-
code. I would like to avoid this last option as it is a
very long query, with over 40 fields.
Thank you,
Marc
I would like to avoid adding a form expression in a query
such as =[Forms]![PopUp_Export]![CboN]
I've been advised that this can be done entering the WHERE
restriction by code, which looks something like this:
dim strWhere as string
if isnull(cboSalesRep) = false then
strWhere = "SalesRep = '" & cboSalesRep & "'"
end if
But I don't know how to make the Query to execute this
WHERE condition without entering the whole query using sql-
code. I would like to avoid this last option as it is a
very long query, with over 40 fields.
Thank you,
Marc