Hello!
I'm new to access, but i'm facing kind of difficult task now for my level. I have made quite complicated query by form. Which works as autofilter in excel in realy large table. My demand from access would be if all criteria fields in form would be empty then query gives out whole table. I have red a lot about dealing with Null values and works just fine with adding & "*" or using IIF funcion.
Problem: I have 2 date fields in my form. txtstartdate; txtendate. Atm in my query criteria looks following:
Between [Forms]![Custom]![txtstartDate] And [Forms]![Custom]![txtenddate]
Works just fine but there are 2 problems. First one is, that i cant leave this criteria alone if im not interested to sort by date, I just want all records from it if form field is empty. And in this case date is demanding thing in table, since it is not always there query wont show lines with empty date field.
As i understand IIF is no good cause of between in this case. * is impossible too . Have been looking around for a while now and no luck.
Thanks a lot in advance!
I'm new to access, but i'm facing kind of difficult task now for my level. I have made quite complicated query by form. Which works as autofilter in excel in realy large table. My demand from access would be if all criteria fields in form would be empty then query gives out whole table. I have red a lot about dealing with Null values and works just fine with adding & "*" or using IIF funcion.
Problem: I have 2 date fields in my form. txtstartdate; txtendate. Atm in my query criteria looks following:
Between [Forms]![Custom]![txtstartDate] And [Forms]![Custom]![txtenddate]
Works just fine but there are 2 problems. First one is, that i cant leave this criteria alone if im not interested to sort by date, I just want all records from it if form field is empty. And in this case date is demanding thing in table, since it is not always there query wont show lines with empty date field.
As i understand IIF is no good cause of between in this case. * is impossible too . Have been looking around for a while now and no luck.
Thanks a lot in advance!