I've got a table in Access which I'm running a query on. Basically, I've got a control on a form where the user can enter some information. I then want the query to look up any records that are like it (using Like "" & (control) & "" for wildcards), or if the user has not entered anything, look up all the records, including null values.
At the moment I've got this in the expression builder:
IIf([Forms]![frmMint]![cmbSource]<>"",([tblMInt].[fldSource]) Like "*" & [Forms]![frmMint]![cmbSource] & "*",[fldSource])
Here, the [Forms]![frmMint]![cmbSource] is our control, and [fldSource] is our field.
Now, this works - when you type something into the control it will show anything containing the text from our control, as it should, and when you don't it shows everything. BUT it doesn't show any records with null values in our field.
Can anyone help, preferably without having to write SQL? I only say this because I'm going to have to perform this operation on about 20-odd fields too.