How to filter data using FromDate and Todate in executequery

Hi All,

I have created two tables(Hospital1 and Hospital2 (Temp) ) one of them is regular and second one is Temp table with same fields and a form using temp table as a data source. I created “Date” field in the table and usin FromDate and ToDate(Unbound countrols) in the form I want to filter the data using ExecuteQuery method. Please help me with logic

Thankyou in Advance.

What is the problem you need help with? Do you mean that you don’t know how to add a query range at all and you’re looking for an introduction to query development, or do you have a particular problem with your scenario?

I know the queryrange but I don’t how to write it in the Executequery method on unbound controls.

Set the Auto Declaration property of your unbound controls to Yes.

When setting the value of a query range, refer to your controls by name and call their dateValue() method. For example:

range.value(queryRange(FromDate.dateValue(), ToDate.dateValue()));
1 Like