We have a database that tracks sanitary and storm sewer maintenance. There is a form that I want to order based on the sewer type field (SYSTEM = san or sto). I can do this with a query but this code was written by others so I’m a bit nervous about changing it too much. Currently the form’s Record Source is:
Select * from TACTION order by Jet_Seq
This works fine for [SYSTEM]=”SAN” but not STO. I tried modifying the Record Sources a couple times but neither worked.
=iif([system]=”san”, select * from TACTION order by Jet_Seq, select * from TACTION order by Clean_Seq)
= select * from TACTION order by (if([system]=”san”, Jet_Seq, Clean_Seq))
Am I close here or way off base? Any suggestions would be greatly appreciated.
Thanks,
SKK
Select * from TACTION order by Jet_Seq
This works fine for [SYSTEM]=”SAN” but not STO. I tried modifying the Record Sources a couple times but neither worked.
=iif([system]=”san”, select * from TACTION order by Jet_Seq, select * from TACTION order by Clean_Seq)
= select * from TACTION order by (if([system]=”san”, Jet_Seq, Clean_Seq))
Am I close here or way off base? Any suggestions would be greatly appreciated.
Thanks,
SKK