sorting calculated expressions

icemonster

Registered User.
Local time
Today, 12:13
Joined
Jan 30, 2010
Messages
502
hi

i have two calculated expression fields

the first is when a review should be done upon hiring and the other is the succeeding review afterwards and it goes like this:

initial review: IIf([TypeofHomemaker]=1,DateAdd("m",3,[HireDate]),IIf([TypeofHomemaker]=2,DateAdd("m",6,[HireDate])))

VisitDate: IIf([SupervisoryVisitDate] Is Null,[InitialVisit],IIf([TypeofHomemaker]=1,DateAdd("m",3,[SupervisoryVisitDate]),IIf([TypeofHomemaker]=2,DateAdd("m",6,[SupervisoryVisitDate]))))

now when i try to sort this, i get a parameter value. can anyone help me? thanks
 
Were you doing this in SQL and trying to say Order By visitdate, if so that doesn't work, you have to quote the formula.
You might find it simpler to do the sort in a second query.

Brian
 
what do you mean 2nd query? make a new one out of this and sort it through that? what about if it's in a VBA?
 
This is the queries forum, assumed that you were talking straight queries not SQL strings, guess you must just take the first option.

Brian
 
thanks. it worked! never crossed my mind to do the secondary query.
 

Users who are viewing this thread

Back
Top Bottom