G
Guest
Find all records in a field from a table that contains a key word from a
control on a form.
Table jan05 has records in a field named type that contains values that may
have more than one word. I'd like to run a query that would allow me to find
records deprending on a "key" word I choose from a combo box on my form.
form control [TypeCombo] contains values
Acc
Pho
Cns
Txz
Combined
Some of the records in the table might contain "acc ytd" or "acc hgf" or "hg
acc".
If i choose acc from my userform 'd like my query to still return all
records that contain "acc" somewhere in that record. Also if I select
Combined I just want to return all records.
Here's what I have in my criteria field:
Like IIf([forms]![MainForm]![TypeCombo]="Combined","*",Like "*" &
[forms]![MainForm]![TypeCombo] & "*")
Problem is this isn't working for me I've chosen acc in my combo box and I
know i have records with that text but it's not returning records. Your help
is greatly appreciated.
control on a form.
Table jan05 has records in a field named type that contains values that may
have more than one word. I'd like to run a query that would allow me to find
records deprending on a "key" word I choose from a combo box on my form.
form control [TypeCombo] contains values
Acc
Pho
Cns
Txz
Combined
Some of the records in the table might contain "acc ytd" or "acc hgf" or "hg
acc".
If i choose acc from my userform 'd like my query to still return all
records that contain "acc" somewhere in that record. Also if I select
Combined I just want to return all records.
Here's what I have in my criteria field:
Like IIf([forms]![MainForm]![TypeCombo]="Combined","*",Like "*" &
[forms]![MainForm]![TypeCombo] & "*")
Problem is this isn't working for me I've chosen acc in my combo box and I
know i have records with that text but it's not returning records. Your help
is greatly appreciated.