Hello everybody!
I'm new at this forum and if you can help me, please do it.
The problem is as follows:
I have an a form which I use as a dialog box for generating a Report. In this form there are 5 fields which have to be filled, so that e Report can be generated. If I don't fill any of these fields I will receive the empty Report. So all of them have to be filled. The Report uses the data from a query, and this query contains some criteria which are related with the data entered on the fields that I've mentioned before.
How can I define a criteria on the query so that if I fill only one or more fields (not all fields) I will receive the Report which is related only with the data I typed on the mentioned fields?
i.e.
In the form that I use as a dialog box, I have two fields (called “From” and “To”) which are Date Type. The dates typed in these fields will generate a Report with only the data between the two dates. However, what I’m not able to do is type in one date in the “From” or “To” field to generate data only for that particularly date.
My question is:
How to define Criteria on the query so that whatever simple date I type in a field, I will get data for that date; otherwise if I type two dates on “From” and “To”, it will generate the data between two dates?
I'm new at this forum and if you can help me, please do it.
The problem is as follows:
I have an a form which I use as a dialog box for generating a Report. In this form there are 5 fields which have to be filled, so that e Report can be generated. If I don't fill any of these fields I will receive the empty Report. So all of them have to be filled. The Report uses the data from a query, and this query contains some criteria which are related with the data entered on the fields that I've mentioned before.
How can I define a criteria on the query so that if I fill only one or more fields (not all fields) I will receive the Report which is related only with the data I typed on the mentioned fields?
i.e.
In the form that I use as a dialog box, I have two fields (called “From” and “To”) which are Date Type. The dates typed in these fields will generate a Report with only the data between the two dates. However, what I’m not able to do is type in one date in the “From” or “To” field to generate data only for that particularly date.
My question is:
How to define Criteria on the query so that whatever simple date I type in a field, I will get data for that date; otherwise if I type two dates on “From” and “To”, it will generate the data between two dates?