Hi everyone,
I'm looking for some help please. I have a continuous form, with several fields which can be filtered using combo boxes. Once the user has filtered the form, I want them to enter values into a series of text boxes and then use these values to update the filtered records, and only the filtered records.
I have an update query, but I'm struggling to get the query to match up to the filtered form i.e. show the same records.
Within the query, for each field that relates to one of the filter combo boxes on the form, I have the following parameter: (qryEnterCosts is the query that the frmEnterCosts and the update query are based on)
IIf([Forms]![frmEnterCosts]![cboFilterProduc t].[ListIndex]>-1,[Forms]![frmEnterCosts]![cboFilterProduc t],[qryEnterCosts]![FullProdCode])
This works to a point, except that if the combo box is empty, I want it to match all values including null ones (as it does on the form filter). Instead, it matches all values, but not null ones.
So basically, how do I set the query parameters to return all values including null ones if the combo box is empty, and then only values matching the combo box, if it is populated?
Many thanks
Neil
I'm looking for some help please. I have a continuous form, with several fields which can be filtered using combo boxes. Once the user has filtered the form, I want them to enter values into a series of text boxes and then use these values to update the filtered records, and only the filtered records.
I have an update query, but I'm struggling to get the query to match up to the filtered form i.e. show the same records.
Within the query, for each field that relates to one of the filter combo boxes on the form, I have the following parameter: (qryEnterCosts is the query that the frmEnterCosts and the update query are based on)
IIf([Forms]![frmEnterCosts]![cboFilterProduc t].[ListIndex]>-1,[Forms]![frmEnterCosts]![cboFilterProduc t],[qryEnterCosts]![FullProdCode])
This works to a point, except that if the combo box is empty, I want it to match all values including null ones (as it does on the form filter). Instead, it matches all values, but not null ones.
So basically, how do I set the query parameters to return all values including null ones if the combo box is empty, and then only values matching the combo box, if it is populated?
Many thanks
Neil
Comment