sorting fields on a form based on other fields

Darla123

Registered User.
Local time
Today, 11:42
Joined
Jul 29, 2015
Messages
23
Hello, I have a form that has 2 date fields on it, Date1 and Date2. These 2 fields are on the same row of the report and are tied to each other (just for internal purposes, not in the DB itself). The control is a query. Normally the fields are listed in ascending order by Date2. Sometimes there will be no value for Date2. If that's the case, I would like all the Date1 fields that don't have a Date2 value to reorder. This sounds really confusing the way I've explained it, so I attached a screenshot. Any help is appreciated!
 

Attachments

  • screenshot.JPG
    screenshot.JPG
    66.4 KB · Views: 80
Why can't you open 2 queries,
QsData2dates
And
QsDataMissingDate2
 
on your query create an expression and sort on this expression. ie:

SortField: nz([Date2],"99999999") & nz([Date1],"00000000")
 

Users who are viewing this thread

Back
Top Bottom