I can't find how, on a query, the app insertes a default value when the user gives no value . for example: the app asks you to give a time period (from-to). if the user press "enter" it takes no value and shows nothing. Can, somehow, takes two default values, one for "from" and one for "to" ?
if i insert no value on a query, can the programme run with a default value?
Collapse
X
-
Tags: None
-
i had tried your solution, and i tried again now. The problem is that if the user insert a value like #1/4/2009# for date1, the app takes the #1/1/2009# because of OR. It will work only whith an If, but i still haven't found that. Maybe with If and IsNull...Comment
-
Sorry I was tired last night when I did this ... :)
try this
Code:SELECT ... FROM ... WHERE DateField BETWEEN iif(isnull([UserDate1]),#01/01/2009#,[UserDate1]) AND iif(isnull([UserDate2],#31/12/2009#,[UserDate2])
Comment
-
Comment