G
Guest
Hi,
I have the following question:
I have a table with all kinds of data including the machine number. I also
designed a form with a text field where you can enter a machine number. If
there is no machine number filled in, the query should show all data for all
machine numbers. In the case there is a machine number filled in, the query
should show only the data for the entered machine number.
In the criteria (in the query) for the machine number I entered the
following: IIf([Forms]![F_Start]![MachineNumber]="";Like
"*";[Forms]![F_Start]![MachineNumber]). When I enter a machine number in the
text field this works ok, only the relevant machine number data is displayed.
When I enter nothing in the text field, the query doesn't work correct. No
records are shown.
If I try only the criteria Like "*" (without the iff function and the rest)
the query shows all data for all machine numbers.
What am I doing wrong?
Thanks in advance,
JeroenM.
I have the following question:
I have a table with all kinds of data including the machine number. I also
designed a form with a text field where you can enter a machine number. If
there is no machine number filled in, the query should show all data for all
machine numbers. In the case there is a machine number filled in, the query
should show only the data for the entered machine number.
In the criteria (in the query) for the machine number I entered the
following: IIf([Forms]![F_Start]![MachineNumber]="";Like
"*";[Forms]![F_Start]![MachineNumber]). When I enter a machine number in the
text field this works ok, only the relevant machine number data is displayed.
When I enter nothing in the text field, the query doesn't work correct. No
records are shown.
If I try only the criteria Like "*" (without the iff function and the rest)
the query shows all data for all machine numbers.
What am I doing wrong?
Thanks in advance,
JeroenM.