toolman2
Technical User
- Jul 31, 2001
- 12
I have created a report that has field ("pocket"
by which the rows in the detail section are sorted. Based on the value in "Mach", "pocket" gets its value from one of two other fields. Here is the IIf statement.
=IIf([Mach]="6480" Or [Mach]="2624" Or [Mach]="2623",[Pocket(6480,2624)],[Pocket(6483,2625)])
This statement is in the controlsource for "pocket" and works correctly, however, it only sorts correctly when the value from Pocket(6480,2624) is inserted in the field and not when the value from Pocket(6483,2625) is inserted there.
I've gone through the Sorting and Grouping window and both fields are selected to sort with ascending. They are also in the underlying query and selected to sort with ascending.
I'm at a loss after trying several things. I'm not a VBA guy, but I'm willing to try it with a little guidance, if necessary. Have looked for code but ignorance is standing in the way of applying any.
Thanks
Kev
=IIf([Mach]="6480" Or [Mach]="2624" Or [Mach]="2623",[Pocket(6480,2624)],[Pocket(6483,2625)])
This statement is in the controlsource for "pocket" and works correctly, however, it only sorts correctly when the value from Pocket(6480,2624) is inserted in the field and not when the value from Pocket(6483,2625) is inserted there.
I've gone through the Sorting and Grouping window and both fields are selected to sort with ascending. They are also in the underlying query and selected to sort with ascending.
I'm at a loss after trying several things. I'm not a VBA guy, but I'm willing to try it with a little guidance, if necessary. Have looked for code but ignorance is standing in the way of applying any.
Thanks
Kev