WhiskyLima
Registered User.
- Local time
- Today, 01:29
- Joined
- Oct 8, 2013
- Messages
- 48
Hi All, I have a continuous form which has a number of entries in it and one of the fields is a due date for a payment. I have the whole form based on a query with a few combo box controls to 'filter' the data. Each combo box relates to a criteria in the query. All working and does what it should, nothing complicated there. What im now trying to do is to add another criteria for the 'dueDate' field which will filter the info depending on the selection in the due date combo box 'dueDateSelect'. Here is what I have attempted to use:
This doesn't work at all and produces and invalid argument error. I know it's probably totally wrong but I wonder if someone could help me find the correct criteria for this 'dueDate' Field in my query.
There are three criteria for this one "All Invoices" to show everything, "Due This Week" to show everything between now and seven days time and "Overdue" To show everything that has not been paid and has a due date in the past.
Many Thanks
Code:
IIf([forms]![All Invoices]![dueDateSelect]="All Invoices","*", IIF([forms]![All Invoices]![dueDateSelect] = "Due This Week", >= Date() AND <= DateAdd("d", 7, Date()), < Date()))
There are three criteria for this one "All Invoices" to show everything, "Due This Week" to show everything between now and seven days time and "Overdue" To show everything that has not been paid and has a due date in the past.
Many Thanks