G
Guest
I have a criteria form to allow users to chose various info from dropdowns
that will be used as filters for a query. For example, if a user selects a
site from my cboSite field on my form and then opens the query, it is
filtered by this value. However, I also want to let the user leave this field
blank on my form to show all Sites.
This is the query field criteria I have used in the past that seems to work
okay:
Like "*" & [Forms]![frmUserPrepReadinessBySiteAndFunctionCriteria]![cboSite]
The Like "*" is what allows all sites to show if the form field is left blank.
Is there a better way to do this? I think my way might cause some issues,
like if one site name ("ABC") is part of another site name ("ABCDEF").
Thanks in advance for your reply,
Clint
that will be used as filters for a query. For example, if a user selects a
site from my cboSite field on my form and then opens the query, it is
filtered by this value. However, I also want to let the user leave this field
blank on my form to show all Sites.
This is the query field criteria I have used in the past that seems to work
okay:
Like "*" & [Forms]![frmUserPrepReadinessBySiteAndFunctionCriteria]![cboSite]
The Like "*" is what allows all sites to show if the form field is left blank.
Is there a better way to do this? I think my way might cause some issues,
like if one site name ("ABC") is part of another site name ("ABCDEF").
Thanks in advance for your reply,
Clint