G
Guest
I have a table containing a number of columns, including "SNameEx" and
"SearchTerms". "SearchTerms" contains a number of different words for
searching purposes. The searching itself is done by a query with a (rather
lengthy) search criteria applied to the "SearchTerms" column. The criteria
goes something like:
Like IIf([Forms]![Search List]![con]=True,"*Con*","") Or
Like IIf([Forms]![Search List]![ign]=True,"*Ign*","") Or
Like IIf([Forms]![Search List]![spel]=True,"*Spl*","") Or
Like IIf([Forms]![Search List]![tra]=True,"*Tra*","") Or
Like IIf([Forms]![Search List]![trig]=True,"*Trg*","") Or
etc. etc.
This criteria references a number of check boxes in a form. If a check box
is checked, then the criteria will search for the associated word in the
"SearchTerms" column of my table, and display all rows containing that word
in their "SearchTerms" column. Any number of check boxes can be selected at
once, so then the query would search for all rows containing one word, and
all rows containing another word, and display all of them. Although you
probably kew all that from looking at the code.
My question is this: In the same form as the check boxes is a listbox. Its
Row Source is the query I just mentioned, and it displays a different column
"SNameEx") in the query. However, the contents of the list box does not
change to reflect any changes in the check box selections. Is there a way to
do this automatically (preferred), or can I add a "Refresh" button into the
form that will update the list box (and query) for the latest check box
selections?
Also, is there any limit on how long the search criteria for a column in a
query can be? I intend to add at least 50 more check boxes for dozens of new
words to be added later, which means a much longer criteria.
On the face of it it sounds like adding all these extra critera will make
the search form immensely slow, but will it? The table contains no more than
600 rows. In which case would it be better to auto-update the list box or to
use a "Refresh" button?
Many thanks.
~Maruno
"SearchTerms". "SearchTerms" contains a number of different words for
searching purposes. The searching itself is done by a query with a (rather
lengthy) search criteria applied to the "SearchTerms" column. The criteria
goes something like:
Like IIf([Forms]![Search List]![con]=True,"*Con*","") Or
Like IIf([Forms]![Search List]![ign]=True,"*Ign*","") Or
Like IIf([Forms]![Search List]![spel]=True,"*Spl*","") Or
Like IIf([Forms]![Search List]![tra]=True,"*Tra*","") Or
Like IIf([Forms]![Search List]![trig]=True,"*Trg*","") Or
etc. etc.
This criteria references a number of check boxes in a form. If a check box
is checked, then the criteria will search for the associated word in the
"SearchTerms" column of my table, and display all rows containing that word
in their "SearchTerms" column. Any number of check boxes can be selected at
once, so then the query would search for all rows containing one word, and
all rows containing another word, and display all of them. Although you
probably kew all that from looking at the code.
My question is this: In the same form as the check boxes is a listbox. Its
Row Source is the query I just mentioned, and it displays a different column
"SNameEx") in the query. However, the contents of the list box does not
change to reflect any changes in the check box selections. Is there a way to
do this automatically (preferred), or can I add a "Refresh" button into the
form that will update the list box (and query) for the latest check box
selections?
Also, is there any limit on how long the search criteria for a column in a
query can be? I intend to add at least 50 more check boxes for dozens of new
words to be added later, which means a much longer criteria.
On the face of it it sounds like adding all these extra critera will make
the search form immensely slow, but will it? The table contains no more than
600 rows. In which case would it be better to auto-update the list box or to
use a "Refresh" button?
Many thanks.
~Maruno