I have an input form with five fields of data that I want to use as parameters in a query to filter records; author, start date, end date, geographic location and text string. When the form is closed it saves the record to a temp table. When the form opens it deletes the temp table and opens up with a new record.
In my query I reference the temp table in the criteria field of the query, so they are all ands (no Or lines). This works great as long as all four fields are not null. My data form opens up with all four criteria being met and there is the record I am looking for.
What my users need to do is enter any combination of these four fields in the input form with any one of them being null. The null fields won’t work in the query especially since the start date and end date are “Between” in the query expression, and the text string expression reads Like (*)&[text string]&(*). A null value in these fields would be enough to cause havoc, but my query will not run if the author or the geographic location fields are null but the start date, end date, and text string have been entered.
Any suggestions as to what path I can take to a solution? I would be grateful.
Good grief!
In my query I reference the temp table in the criteria field of the query, so they are all ands (no Or lines). This works great as long as all four fields are not null. My data form opens up with all four criteria being met and there is the record I am looking for.
What my users need to do is enter any combination of these four fields in the input form with any one of them being null. The null fields won’t work in the query especially since the start date and end date are “Between” in the query expression, and the text string expression reads Like (*)&[text string]&(*). A null value in these fields would be enough to cause havoc, but my query will not run if the author or the geographic location fields are null but the start date, end date, and text string have been entered.
Any suggestions as to what path I can take to a solution? I would be grateful.
Good grief!