Hello
I have a select query that has fields -
Policy_ID
Policy_Name
Rev_Due_Date
I would like to sort these fields depending on a user selection from an option group on a form with ID and Name in ascending order and Date in decending order.
I have tried using something like this:
IIf([Forms]![F_ReportsMenu]![FrameOrderBy]=0,[M_Policy].[Policy_Name],IIF([Forms]![F_ReportsMenu]![FrameOrderBy]=1,[M_Policy].[Policy_ID],[M_Revision].[Rev_Due_Date]))
as another column in the query with Sort set to "Ascending", but it only sorted on the ID.
I have also tried putting:
[Forms]![F_ReportsMenu]![FrameOrderBy]= (option group value)
into the criteria of the applicable fields, but that returned no data.
Does anyone have any ideas?
Thanks in advance.
Azalea.
I have a select query that has fields -
Policy_ID
Policy_Name
Rev_Due_Date
I would like to sort these fields depending on a user selection from an option group on a form with ID and Name in ascending order and Date in decending order.
I have tried using something like this:
IIf([Forms]![F_ReportsMenu]![FrameOrderBy]=0,[M_Policy].[Policy_Name],IIF([Forms]![F_ReportsMenu]![FrameOrderBy]=1,[M_Policy].[Policy_ID],[M_Revision].[Rev_Due_Date]))
as another column in the query with Sort set to "Ascending", but it only sorted on the ID.
I have also tried putting:
[Forms]![F_ReportsMenu]![FrameOrderBy]= (option group value)
into the criteria of the applicable fields, but that returned no data.
Does anyone have any ideas?
Thanks in advance.
Azalea.