Empty Text Field Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am applying the following criteria in my listbox query: HAVING (Table.NAME)
Like("*" & [Forms]![Frm]![Textbox] & "*")

I want show all records if [Forms]![Frm]![Textbox] is empty. But when
Table.NAME is null the record will not show up.

How can I make sure the criteria is applied only when
[Forms]![Frm]![Textbox] is not empty ?
 
You can use the Nz() function, as in
HAVING (Nz(Table.NAME," ") = " ") Or (Table.NAME) Like("*" & [Forms]![Frm]!
[Textbox] & "*")
That will bring "up" your null records.
I am applying the following criteria in my listbox query: HAVING (Table.NAME)
Like("*" & [Forms]![Frm]![Textbox] & "*")

I want show all records if [Forms]![Frm]![Textbox] is empty. But when
Table.NAME is null the record will not show up.

How can I make sure the criteria is applied only when
[Forms]![Frm]![Textbox] is not empty ?
 
Back
Top